diff options
author | Jon Reid | 2012-06-12 13:32:02 -0700 |
---|---|---|
committer | Jon Reid | 2012-06-12 13:32:02 -0700 |
commit | 8c55dfcb0a669eef0a3bb406b70868078ef09810 (patch) | |
tree | e4d070fe1e67fea38cc0343eda297572da717efa /js/controllers/elements/element-controller.js | |
parent | 8e98ce012f55576ddb979969a3a1d834301af0c7 (diff) | |
parent | 7887aafbff794e9c5f918c667e73a8386c38cf02 (diff) | |
download | ninja-8c55dfcb0a669eef0a3bb406b70868078ef09810.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js/controllers/elements/element-controller.js')
-rwxr-xr-x | js/controllers/elements/element-controller.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js index 308e598b..3d71c52d 100755 --- a/js/controllers/elements/element-controller.js +++ b/js/controllers/elements/element-controller.js | |||
@@ -57,7 +57,7 @@ exports.ElementController = Montage.create(Component, { | |||
57 | // Remove the element from the DOM and clear the GLWord. | 57 | // Remove the element from the DOM and clear the GLWord. |
58 | removeElement: { | 58 | removeElement: { |
59 | value: function(el) { | 59 | value: function(el) { |
60 | if(el.elementModel && el.elementModel.shapeModel && el.elementModel.shapeModel.GLWorld) { | 60 | if(el.elementModel.shapeModel && el.elementModel.shapeModel.GLWorld) { |
61 | el.elementModel.shapeModel.GLWorld.clearTree(); | 61 | el.elementModel.shapeModel.GLWorld.clearTree(); |
62 | } | 62 | } |
63 | el.parentNode.removeChild(el); | 63 | el.parentNode.removeChild(el); |
@@ -103,24 +103,24 @@ exports.ElementController = Montage.create(Component, { | |||
103 | 103 | ||
104 | // Return cached value if one exists | 104 | // Return cached value if one exists |
105 | if(isFill) { | 105 | if(isFill) { |
106 | if(el.elementModel.fill) { | 106 | // if(el.elementModel.fill) { |
107 | return el.elementModel.fill; | 107 | // return el.elementModel.fill; |
108 | } | 108 | // } |
109 | //TODO: Once logic for color and gradient is established, this needs to be revised | 109 | //TODO: Once logic for color and gradient is established, this needs to be revised |
110 | color = this.getProperty(el, "background-color"); | 110 | color = this.getProperty(el, "background-color"); |
111 | image = this.getProperty(el, "background-image"); | 111 | image = this.getProperty(el, "background-image"); |
112 | } else { | 112 | } else { |
113 | // Try getting border color from specific side first | 113 | // Try getting border color from specific side first |
114 | if(borderSide) { | 114 | if(borderSide) { |
115 | color = this.getProperty(el, "border-" + borderSide + "-color"); | 115 | color = this.getProperty(el, "border-" + borderSide + "-color",true); |
116 | image = this.getProperty(el, "border-" + borderSide + "-image"); | 116 | image = this.getProperty(el, "border-" + borderSide + "-image"); |
117 | } | 117 | } |
118 | 118 | ||
119 | // If no color was found, look up the shared border color | 119 | // If no color was found, look up the shared border color |
120 | if(!color && !image) { | 120 | if(!color && !image) { |
121 | if(el.elementModel.stroke) { | 121 | // if(el.elementModel.stroke) { |
122 | return el.elementModel.stroke; | 122 | // return el.elementModel.stroke; |
123 | } | 123 | // } |
124 | 124 | ||
125 | color = this.getProperty(el, "border-color"); | 125 | color = this.getProperty(el, "border-color"); |
126 | image = this.getProperty(el, "border-image"); | 126 | image = this.getProperty(el, "border-image"); |
@@ -152,7 +152,7 @@ exports.ElementController = Montage.create(Component, { | |||
152 | }, | 152 | }, |
153 | 153 | ||
154 | setColor: { | 154 | setColor: { |
155 | value: function(el, color, isFill) { | 155 | value: function(el, color, isFill,borderSide) { |
156 | var mode = color.mode; | 156 | var mode = color.mode; |
157 | 157 | ||
158 | if(isFill) { | 158 | if(isFill) { |
@@ -297,7 +297,7 @@ exports.ElementController = Montage.create(Component, { | |||
297 | // Routines to get/set 3D properties | 297 | // Routines to get/set 3D properties |
298 | get3DProperty: { | 298 | get3DProperty: { |
299 | value: function(el, prop) { | 299 | value: function(el, prop) { |
300 | if(el.elementModel && el.elementModel.props3D) { | 300 | if(el.elementModel.props3D) { |
301 | return el.elementModel.props3D[prop]; | 301 | return el.elementModel.props3D[prop]; |
302 | } | 302 | } |
303 | } | 303 | } |
@@ -305,7 +305,7 @@ exports.ElementController = Montage.create(Component, { | |||
305 | 305 | ||
306 | getMatrix: { | 306 | getMatrix: { |
307 | value: function(el) { | 307 | value: function(el) { |
308 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.matrix3d) { | 308 | if(el.elementModel.props3D && el.elementModel.props3D.matrix3d) { |
309 | return el.elementModel.props3D.matrix3d.slice(0); | 309 | return el.elementModel.props3D.matrix3d.slice(0); |
310 | } else { | 310 | } else { |
311 | var mat; | 311 | var mat; |
@@ -325,7 +325,7 @@ exports.ElementController = Montage.create(Component, { | |||
325 | 325 | ||
326 | getPerspectiveDist: { | 326 | getPerspectiveDist: { |
327 | value: function(el) { | 327 | value: function(el) { |
328 | if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { | 328 | if(el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { |
329 | return el.elementModel.props3D.perspectiveDist; | 329 | return el.elementModel.props3D.perspectiveDist; |
330 | } else { | 330 | } else { |
331 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, false); | 331 | var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, false); |