aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-01 21:14:17 -0800
committerNivesh Rajbhandari2012-02-01 21:14:17 -0800
commit01efeff045e7196bab37fc60f7030969ad650d6c (patch)
treecafdccd2b9ff511294cfd2a4ba2dc244b8ebb0d2 /js/controllers/elements
parent830b011d94d728882286d72e129f7405134957c7 (diff)
downloadninja-01efeff045e7196bab37fc60f7030969ad650d6c.tar.gz
Removed border special-casing from PI since the mediator now handles this generically. Updated mediator's set stroke routine to use the setColor routine.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers/elements')
-rw-r--r--js/controllers/elements/element-controller.js13
1 files changed, 3 insertions, 10 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 892ac2f2..9b13e703 100644
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -144,10 +144,6 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
144 this.setProperty(el, "background-color", color.color.css); 144 this.setProperty(el, "background-color", color.color.css);
145 } 145 }
146 } 146 }
147 else
148 {
149 this.application.ninja.stylesController.setElementStyle(el, "background-color", color.color.css);
150 }
151 el.elementModel.fill = color; 147 el.elementModel.fill = color;
152 } 148 }
153 else 149 else
@@ -169,10 +165,6 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
169 this.setProperty(el, "border-color", color.color.css); 165 this.setProperty(el, "border-color", color.color.css);
170 } 166 }
171 } 167 }
172 else
173 {
174 this.application.ninja.stylesController.setElementStyle(el, "border-color", color.color.css);
175 }
176 el.elementModel.stroke = color; 168 el.elementModel.stroke = color;
177 } 169 }
178 } 170 }
@@ -187,8 +179,9 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
187 179
188 setStroke: { 180 setStroke: {
189 value: function(el, stroke) { 181 value: function(el, stroke) {
190 var border = stroke.borderWidth + stroke.borderUnits + " " + stroke.borderStyle + " " + stroke.color.color.css; 182 this.application.ninja.stylesController.setElementStyle(el, "border-width", stroke.borderWidth + stroke.borderUnits);
191 this.application.ninja.stylesController.setElementStyle(el, "border", border); 183 this.application.ninja.stylesController.setElementStyle(el, "border-style", stroke.borderStyle);
184 this.setColor(el, stroke.color, false);
192 } 185 }
193 }, 186 },
194 187