aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/element-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements/element-controller.js')
-rw-r--r--js/controllers/elements/element-controller.js43
1 files changed, 41 insertions, 2 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index f254220c..8a0735f7 100644
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -83,13 +83,52 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
83 83
84 setColor: { 84 setColor: {
85 value: function(el, color, isFill) { 85 value: function(el, color, isFill) {
86 var mode = color.mode;
86 if(isFill) 87 if(isFill)
87 { 88 {
88 this.application.ninja.stylesController.setElementStyle(el, "background-color", color.color.css); 89 if(mode)
90 {
91 switch (mode) {
92 case 'nocolor':
93 this.setProperty(el, "background-image", "none");
94 this.setProperty(el, "background-color", "none");
95 break;
96 case 'gradient':
97 this.setProperty(el, "background-image", color.color.css);
98 this.setProperty(el, "background-color", "none");
99 break;
100 default:
101 this.setProperty(el, "background-image", "none");
102 this.setProperty(el, "background-color", color.color.css);
103 }
104 }
105 else
106 {
107 this.application.ninja.stylesController.setElementStyle(el, "background-color", color.color.css);
108 }
89 } 109 }
90 else 110 else
91 { 111 {
92 this.application.ninja.stylesController.setElementStyle(el, "border-color", color.color.css); 112 if(mode)
113 {
114 switch (mode) {
115 case 'nocolor':
116 this.setProperty(el, "border-image", "none");
117 this.setProperty(el, "border-color", "none");
118 break;
119 case 'gradient':
120 this.setProperty(el, "border-image", color.color.css);
121 this.setProperty(el, "border-color", "none");
122 break;
123 default:
124 this.setProperty(el, "border-image", "none");
125 this.setProperty(el, "border-color", color.color.css);
126 }
127 }
128 else
129 {
130 this.application.ninja.stylesController.setElementStyle(el, "border-color", color.color.css);
131 }
93 } 132 }
94 } 133 }
95 }, 134 },