From 84332ab81c1b445195f1d9be8bbeae0725c8e758 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 6 Mar 2012 10:58:25 -0800 Subject: Squashed commit of preload-fix into Master - Requiring all the previously pre-loaded files - RDGE, Codemirror and gl-matrix are not included via a script tag. Signed-off-by: Valerio Virgillito --- js/tools/RectTool.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'js/tools/RectTool.js') diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index 5e148de3..957afea9 100755 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js @@ -8,6 +8,9 @@ var Montage = require("montage/core/core").Montage, ShapeTool = require("js/tools/ShapeTool").ShapeTool, ShapesController = require("js/controllers/elements/shapes-controller").ShapesController; +var Rectangle = require("js/lib/geom/rectangle").Rectangle; +var MaterialsModel = require("js/models/materials-model").MaterialsModel; + exports.RectTool = Montage.create(ShapeTool, { _toolID: { value: "rectTool" }, @@ -67,13 +70,13 @@ exports.RectTool = Montage.create(ShapeTool, { var strokeM = this.options.strokeMaterial; if(strokeM) { - strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); + strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); } var fillM = this.options.fillMaterial; if(fillM) { - fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); + fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); } } @@ -82,7 +85,7 @@ exports.RectTool = Montage.create(ShapeTool, { var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); - var rect = new GLRectangle(); + var rect = new Rectangle(); rect.init(world, xOffset, yOffset, w, h, strokeSize, strokeColor, fillColor, tlRadius, trRadius, blRadius, brRadius, strokeMaterial, fillMaterial, strokeStyle); -- cgit v1.2.3