aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/element-mediator.js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-03 11:34:53 -0800
committerNivesh Rajbhandari2012-02-03 11:34:53 -0800
commit91de8f585e93d1a959c7fe56775df371ce6f50d6 (patch)
tree1621764c65cf2d0044e31e35b486e8409b31039f /js/mediators/element-mediator.js
parentc203ea7413b5a2b2232d7f8346cd1b9932f2575b (diff)
parent01efeff045e7196bab37fc60f7030969ad650d6c (diff)
downloadninja-91de8f585e93d1a959c7fe56775df371ce6f50d6.tar.gz
Merge branch 'refs/heads/NiveshColor' into ToolFixes
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/mediators/element-mediator.js')
-rw-r--r--js/mediators/element-mediator.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js
index a6f31703..1d0aef44 100644
--- a/js/mediators/element-mediator.js
+++ b/js/mediators/element-mediator.js
@@ -436,7 +436,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
436 getColor: { 436 getColor: {
437 value: function(el, isFill) { 437 value: function(el, isFill) {
438 if(!el.elementModel) { 438 if(!el.elementModel) {
439 NJUtils.makeElementModel(el, "Div", "block"); 439 NJUtils.makeElementModel2(el);
440 } 440 }
441 return el.elementModel.controller["getColor"](el, isFill); 441 return el.elementModel.controller["getColor"](el, isFill);
442 } 442 }
@@ -462,7 +462,7 @@ exports.ElementMediator = Montage.create(NJComponent, {
462 if(!currentValue) { 462 if(!currentValue) {
463 var that = this; 463 var that = this;
464 currentValue = els.map(function(item) { 464 currentValue = els.map(function(item) {
465 return that.getColor(item._element); 465 return that.getColor(item._element, isFill);
466 }); 466 });
467 } 467 }
468 468
@@ -594,6 +594,15 @@ exports.ElementMediator = Montage.create(NJComponent, {
594 } 594 }
595 }, 595 },
596 596
597 getColor2: {
598 value: function(el, prop, mutator) {
599 if(!el.elementModel) {
600 NJUtils.makeElementModel2(el);
601 }
602
603 return this.getColor(el, (prop === "background"));
604 }
605 },
597 606
598 //-------------------------------------------------------------------------------------------------------- 607 //--------------------------------------------------------------------------------------------------------
599 // Routines to get/set 3D properties 608 // Routines to get/set 3D properties