aboutsummaryrefslogtreecommitdiff
path: root/js/tools/LineTool.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-12 16:25:28 -0700
committerNivesh Rajbhandari2012-03-12 16:25:28 -0700
commit5fb358d9e80a364d5f300d60b7a9fe0f773741e7 (patch)
tree2c4d5292b19c91697dffb542f369ec9dcb340f77 /js/tools/LineTool.js
parent5f9b67be3b8bdb391d021103c6bcee6be2f6cdf4 (diff)
parent69d90467865a1384725b2301901be2180c5a841f (diff)
downloadninja-5fb358d9e80a364d5f300d60b7a9fe0f773741e7.tar.gz
Merge branch 'refs/heads/ninja-internal' into ToolFixes
Diffstat (limited to 'js/tools/LineTool.js')
-rwxr-xr-xjs/tools/LineTool.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/tools/LineTool.js b/js/tools/LineTool.js
index 32572af1..a61f8f79 100755
--- a/js/tools/LineTool.js
+++ b/js/tools/LineTool.js
@@ -13,6 +13,9 @@ var Montage = require("montage/core/core").Montage,
13 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController, 13 ShapesController = require("js/controllers/elements/shapes-controller").ShapesController,
14 ShapeModel = require("js/models/shape-model").ShapeModel; 14 ShapeModel = require("js/models/shape-model").ShapeModel;
15 15
16var Line = require("js/lib/geom/line").Line;
17var MaterialsModel = require("js/models/materials-model").MaterialsModel;
18
16exports.LineTool = Montage.create(ShapeTool, { 19exports.LineTool = Montage.create(ShapeTool, {
17 _toolID: { value: "lineTool" }, 20 _toolID: { value: "lineTool" },
18 _imageID: { value: "lineToolImg" }, 21 _imageID: { value: "lineToolImg" },
@@ -211,7 +214,7 @@ exports.LineTool = Montage.create(ShapeTool, {
211 var strokeM = this.options.strokeMaterial; 214 var strokeM = this.options.strokeMaterial;
212 if(strokeM) 215 if(strokeM)
213 { 216 {
214 strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); 217 strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM));
215 } 218 }
216 } 219 }
217 220
@@ -220,7 +223,7 @@ exports.LineTool = Montage.create(ShapeTool, {
220 var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); 223 var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2);
221 var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); 224 var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2));
222 225
223 var line = new GLLine(world, xOffset, yOffset, w, h, slope, strokeSize, strokeColor, strokeMaterial, strokeStyle, xAdj, yAdj); 226 var line = new Line(world, xOffset, yOffset, w, h, slope, strokeSize, strokeColor, strokeMaterial, strokeStyle, xAdj, yAdj);
224 227
225 world.addObject(line); 228 world.addObject(line);
226 world.render(); 229 world.render();