diff options
author | Valerio Virgillito | 2012-03-06 10:58:25 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-03-06 10:58:25 -0800 |
commit | 84332ab81c1b445195f1d9be8bbeae0725c8e758 (patch) | |
tree | e322baa1f98d4507ec255279198fa2284b2dff3c /js/tools/OvalTool.js | |
parent | 13f52cf0c74f53a919fa864f86669e8155f82961 (diff) | |
download | ninja-84332ab81c1b445195f1d9be8bbeae0725c8e758.tar.gz |
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 <valerio@motorola.com>
Diffstat (limited to 'js/tools/OvalTool.js')
-rwxr-xr-x | js/tools/OvalTool.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/js/tools/OvalTool.js b/js/tools/OvalTool.js index 911059a7..a10e0bb5 100755 --- a/js/tools/OvalTool.js +++ b/js/tools/OvalTool.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 Circle = require("js/lib/geom/circle").Circle; | ||
12 | var MaterialsModel = require("js/models/materials-model").MaterialsModel; | ||
13 | |||
11 | exports.OvalTool = Montage.create(ShapeTool, { | 14 | exports.OvalTool = Montage.create(ShapeTool, { |
12 | 15 | ||
13 | _toolID: { value: "ovalTool" }, | 16 | _toolID: { value: "ovalTool" }, |
@@ -48,13 +51,13 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
48 | var strokeM = this.options.strokeMaterial; | 51 | var strokeM = this.options.strokeMaterial; |
49 | if(strokeM) | 52 | if(strokeM) |
50 | { | 53 | { |
51 | strokeMaterial = Object.create(MaterialsLibrary.getMaterial(strokeM)); | 54 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
52 | } | 55 | } |
53 | 56 | ||
54 | var fillM = this.options.fillMaterial; | 57 | var fillM = this.options.fillMaterial; |
55 | if(fillM) | 58 | if(fillM) |
56 | { | 59 | { |
57 | fillMaterial = Object.create(MaterialsLibrary.getMaterial(fillM)); | 60 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
58 | } | 61 | } |
59 | } | 62 | } |
60 | 63 | ||
@@ -63,7 +66,7 @@ exports.OvalTool = Montage.create(ShapeTool, { | |||
63 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); | 66 | var xOffset = ((left - canvas.offsetLeft + w/2) - canvas.width/2); |
64 | var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); | 67 | var yOffset = (canvas.height/2 - (top - canvas.offsetTop + h/2)); |
65 | 68 | ||
66 | var oval = new GLCircle(); | 69 | var oval = new Circle(); //GLCircle(); |
67 | oval.init(world, xOffset, yOffset, w, h, strokeSize, strokeColor, fillColor, innerRadius, strokeMaterial, fillMaterial, strokeStyle); | 70 | oval.init(world, xOffset, yOffset, w, h, strokeSize, strokeColor, fillColor, innerRadius, strokeMaterial, fillMaterial, strokeStyle); |
68 | 71 | ||
69 | world.addObject(oval); | 72 | world.addObject(oval); |