aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/element-mediator.js
diff options
context:
space:
mode:
authorJose Antonio Marquez Russo2012-02-01 17:11:21 -0800
committerJose Antonio Marquez Russo2012-02-01 17:11:21 -0800
commit83ac41dd75ec551cdb03252e0bf3081182517d05 (patch)
tree75781b24936e90c815f13dd5d2158c65fef643e3 /js/mediators/element-mediator.js
parent9c317ebb46e82a00b83eb732c73ae39ce9ef46b9 (diff)
parent830b011d94d728882286d72e129f7405134957c7 (diff)
downloadninja-83ac41dd75ec551cdb03252e0bf3081182517d05.tar.gz
Merge pull request #2 from mqg734/NiveshColor
Updated PI color code to go through mediator. Also enabled getting/setting color support for shapes.
Diffstat (limited to 'js/mediators/element-mediator.js')
-rw-r--r--js/mediators/element-mediator.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index 4c34e668..7c5c161c 100644
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -431,7 +431,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
431 getColor: { 431 getColor: {
432 value: function(el, isFill) { 432 value: function(el, isFill) {
433 if(!el.elementModel) { 433 if(!el.elementModel) {
434 NJUtils.makeElementModel(el, "Div", "block"); 434 NJUtils.makeElementModel2(el);
435 } 435 }
436 return el.elementModel.controller["getColor"](el, isFill); 436 return el.elementModel.controller["getColor"](el, isFill);
437 } 437 }
@@ -589,6 +589,15 @@ exports.ElementMediator = Montage.create(NJComponent, {
589 } 589 }
590 }, 590 },
591 591
592 getColor2: {
593 value: function(el, prop, mutator) {
594 if(!el.elementModel) {
595 NJUtils.makeElementModel2(el);
596 }
597
598 return this.getColor(el, (prop === "background"));
599 }
600 },
592 601
593 //-------------------------------------------------------------------------------------------------------- 602 //--------------------------------------------------------------------------------------------------------
594 // Routines to get/set 3D properties 603 // Routines to get/set 3D properties