diff options
author | hwc487 | 2012-04-13 11:52:13 -0700 |
---|---|---|
committer | hwc487 | 2012-04-13 11:52:13 -0700 |
commit | 4f2fb5764703cab4ce3ada719b1395ed1e2f3b7c (patch) | |
tree | 3dc2e3c5a041179eed38eab1a00f851554e50005 /js/tools/RectTool.js | |
parent | 521df0ed9242efff45715998837068c87aca7efd (diff) | |
parent | 4b900ea5cd6bb77eb30cec8c03b9ec9fa662c1e9 (diff) | |
download | ninja-4f2fb5764703cab4ce3ada719b1395ed1e2f3b7c.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Snapping_II
Conflicts:
js/helper-classes/3D/view-utils.js
js/panels/presets/animations-presets.reel/animations-presets.js
js/panels/presets/style-presets.reel/style-presets.js
js/panels/presets/transitions-presets.reel/transitions-presets.js
js/tools/Translate3DToolBase.js
Diffstat (limited to 'js/tools/RectTool.js')
-rwxr-xr-x | js/tools/RectTool.js | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/js/tools/RectTool.js b/js/tools/RectTool.js index 957afea9..0c14a559 100755 --- a/js/tools/RectTool.js +++ b/js/tools/RectTool.js | |||
@@ -72,12 +72,14 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
72 | { | 72 | { |
73 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); | 73 | strokeMaterial = Object.create(MaterialsModel.getMaterial(strokeM)); |
74 | } | 74 | } |
75 | strokeColor = ShapesController.getMaterialColor(strokeM) || strokeColor; | ||
75 | 76 | ||
76 | var fillM = this.options.fillMaterial; | 77 | var fillM = this.options.fillMaterial; |
77 | if(fillM) | 78 | if(fillM) |
78 | { | 79 | { |
79 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); | 80 | fillMaterial = Object.create(MaterialsModel.getMaterial(fillM)); |
80 | } | 81 | } |
82 | fillColor = ShapesController.getMaterialColor(fillM) || fillColor; | ||
81 | } | 83 | } |
82 | 84 | ||
83 | var world = this.getGLWorld(canvas, this.options.use3D); | 85 | var world = this.getGLWorld(canvas, this.options.use3D); |
@@ -98,25 +100,12 @@ exports.RectTool = Montage.create(ShapeTool, { | |||
98 | canvas.elementModel.selection = "Rectangle"; | 100 | canvas.elementModel.selection = "Rectangle"; |
99 | canvas.elementModel.pi = "RectanglePi"; | 101 | canvas.elementModel.pi = "RectanglePi"; |
100 | canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; | 102 | canvas.elementModel.shapeModel.strokeSize = this.options.strokeSize.value + " " + this.options.strokeSize.units; |
101 | canvas.elementModel.shapeModel.stroke = strokeColor; | ||
102 | canvas.elementModel.shapeModel.fill = fillColor; | ||
103 | if(strokeColor) | ||
104 | { | ||
105 | canvas.elementModel.shapeModel.border = this.application.ninja.colorController.colorToolbar.stroke; | ||
106 | } | ||
107 | if(fillColor) | ||
108 | { | ||
109 | canvas.elementModel.shapeModel.background = this.application.ninja.colorController.colorToolbar.fill; | ||
110 | } | ||
111 | 103 | ||
112 | canvas.elementModel.shapeModel.tlRadius = this.options.TLRadiusControl.value + " " + this.options.TLRadiusControl.units; | 104 | canvas.elementModel.shapeModel.tlRadius = this.options.TLRadiusControl.value + " " + this.options.TLRadiusControl.units; |
113 | canvas.elementModel.shapeModel.trRadius = this.options.TRRadiusControl.value + " " + this.options.TRRadiusControl.units; | 105 | canvas.elementModel.shapeModel.trRadius = this.options.TRRadiusControl.value + " " + this.options.TRRadiusControl.units; |
114 | canvas.elementModel.shapeModel.blRadius = this.options.BLRadiusControl.value + " " + this.options.BLRadiusControl.units; | 106 | canvas.elementModel.shapeModel.blRadius = this.options.BLRadiusControl.value + " " + this.options.BLRadiusControl.units; |
115 | canvas.elementModel.shapeModel.brRadius = this.options.BRRadiusControl.value + " " + this.options.BRRadiusControl.units; | 107 | canvas.elementModel.shapeModel.brRadius = this.options.BRRadiusControl.value + " " + this.options.BRRadiusControl.units; |
116 | 108 | ||
117 | canvas.elementModel.shapeModel.strokeMaterial = strokeMaterial; | ||
118 | canvas.elementModel.shapeModel.fillMaterial = fillMaterial; | ||
119 | |||
120 | canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; | 109 | canvas.elementModel.shapeModel.strokeStyleIndex = strokeStyleIndex; |
121 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; | 110 | canvas.elementModel.shapeModel.strokeStyle = strokeStyle; |
122 | 111 | ||