diff options
author | Jose Antonio Marquez | 2012-03-06 17:02:44 -0800 |
---|---|---|
committer | Jose Antonio Marquez | 2012-03-06 17:02:44 -0800 |
commit | fca92904597895675ddd216399cd235f3c5a7cfa (patch) | |
tree | 77c30a958c0283a6aa208b93640c6008eeb943e2 /js/tools/RectTool.js | |
parent | ec7cbc95de031d2be667c2a8629a9d63e91f7e1a (diff) | |
parent | eebb7de4d19cddec9c763a073d8cf41d76fe70f7 (diff) | |
download | ninja-fca92904597895675ddd216399cd235f3c5a7cfa.tar.gz |
Merge branch 'refs/heads/FileIO' into FileIO-Build-Candidate
Diffstat (limited to 'js/tools/RectTool.js')
-rwxr-xr-x | js/tools/RectTool.js | 9 |
1 files changed, 6 insertions, 3 deletions
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, | |||
8 | ShapeTool = require("js/tools/ShapeTool").ShapeTool, | 8 | ShapeTool = require("js/tools/ShapeTool").ShapeTool, |
9 | ShapesController = require("js/controllers/elements/shapes-controller").ShapesController; | 9 | ShapesController = require("js/controllers/elements/shapes-controller").ShapesController; |
10 | 10 | ||
11 | var Rectangle = require("js/lib/geom/rectangle").Rectangle; | ||
12 | var MaterialsModel = require("js/models/materials-model").MaterialsModel; | ||
13 | |||
11 | exports.RectTool = Montage.create(ShapeTool, { | 14 | exports.RectTool = Montage.create(ShapeTool, { |
12 | 15 | ||
13 | _toolID: { value: "rectTool" }, | 16 | _toolID: { value: "rectTool" }, |
@@ -67,13 +70,13 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
67 | var strokeM = this.options.strokeMaterial; | 70 | var strokeM = this.options.strokeMaterial; |
68 | if(strokeM) | 71 | if(strokeM) |
69 | { | 72 | { |
70 | strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); | 73 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
71 | } | 74 | } |
72 | 75 | ||
73 | var fillM = this.options.fillMaterial; | 76 | var fillM = this.options.fillMaterial; |
74 | if(fillM) | 77 | if(fillM) |
75 | { | 78 | { |
76 | fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); | 79 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
77 | } | 80 | } |
78 | } | 81 | } |
79 | 82 | ||
@@ -82,7 +85,7 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
82 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); | 85 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); |
83 | var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); | 86 | var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); |
84 | 87 | ||
85 | var rect = new GLRectangle(); | 88 | var rect = new Rectangle(); |
86 | rect.init(world, xOffset, yOffset, w, h, strokeSize, strokeColor, fillColor, | 89 | rect.init(world, xOffset, yOffset, w, h, strokeSize, strokeColor, fillColor, |
87 | tlRadius, trRadius, blRadius, brRadius, strokeMaterial, fillMaterial, strokeStyle); | 90 | tlRadius, trRadius, blRadius, brRadius, strokeMaterial, fillMaterial, strokeStyle); |
88 | 91 | ||