aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/properties.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-xjs/panels/properties.reel/properties.js70
1 files changed, 35 insertions, 35 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index b83ae170..070f6f87 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -163,12 +163,12 @@ exports.Properties = Montage.create(Component, {
163 NJevent("updatedID",this.application.ninja.selectedElements[0]); 163 NJevent("updatedID",this.application.ninja.selectedElements[0]);
164 } 164 }
165 }, 165 },
166 166
167 handleKeyup: { 167 handleKeyup: {
168 value: function(event) { 168 value: function(event) {
169 if(event.keyCode === 13) { 169 if(event.keyCode === 13) {
170 event.target.blur(); 170 event.target.blur();
171 } 171 }
172 } 172 }
173 }, 173 },
174 174
@@ -320,18 +320,18 @@ exports.Properties = Montage.create(Component, {
320 320
321 // Root element color chip 321 // Root element color chip
322 if(isRoot) { 322 if(isRoot) {
323 // 323 //
324 var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"]; 324 var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"];
325 // 325 //
326 if (ElementsMediator.getProperty(el, "background-image")) { 326 if (ElementsMediator.getProperty(el, "background-image")) {
327 rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); 327 rootBackgroundColor = ElementsMediator.getProperty(el, "background-image");
328 if (!rootBackgroundColor.mode) rootBackgroundColor = null; 328 if (!rootBackgroundColor.mode) rootBackgroundColor = null;
329 } else if (ElementsMediator.getProperty(el, "background-color")){ 329 } else if (ElementsMediator.getProperty(el, "background-color")){
330 rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); 330 rootBackgroundColor = ElementsMediator.getProperty(el, "background-color");
331 if (!rootBackgroundColor.mode) rootBackgroundColor = null; 331 if (!rootBackgroundColor.mode) rootBackgroundColor = null;
332 } else if (ElementsMediator.getProperty(el, "background")){ 332 } else if (ElementsMediator.getProperty(el, "background")){
333 rootBackgroundColor = ElementsMediator.getProperty(el, "background"); 333 rootBackgroundColor = ElementsMediator.getProperty(el, "background");
334 if (!rootBackgroundColor.mode) rootBackgroundColor = null; 334 if (!rootBackgroundColor.mode) rootBackgroundColor = null;
335 } 335 }
336 // 336 //
337 if(rootBackgroundColor) { 337 if(rootBackgroundColor) {
@@ -344,7 +344,7 @@ exports.Properties = Montage.create(Component, {
344 344
345 345
346 346
347 var previousInput = this.application.ninja.colorController.colorModel.input; 347 var previousInput = this.application.ninja.colorController.colorModel.input;
348 customPI = PiData[this.customPi]; 348 customPI = PiData[this.customPi];
349 // Get all the custom section for the custom PI 349 // Get all the custom section for the custom PI
350 for(var i = 0, customSec; customSec = customPI[i]; i++) { 350 for(var i = 0, customSec; customSec = customPI[i]; i++) {
@@ -411,31 +411,31 @@ exports.Properties = Montage.create(Component, {
411 if (previousInput === 'chip') return; 411 if (previousInput === 'chip') return;
412 this.application.ninja.colorController.colorModel.input = previousInput; 412 this.application.ninja.colorController.colorModel.input = previousInput;
413 var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1]; 413 var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1];
414 color.c.wasSetByCode = true; 414 color.c.wasSetByCode = true;
415 color.c.type = 'change'; 415 color.c.type = 'change';
416 switch (color.m) { 416 switch (color.m) {
417 case 'rgb': 417 case 'rgb':
418 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; 418 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'};
419 this.application.ninja.colorController.colorModel.rgb = color.c; 419 this.application.ninja.colorController.colorModel.rgb = color.c;
420 break; 420 break;
421 case 'hsl': 421 case 'hsl':
422 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; 422 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'};
423 this.application.ninja.colorController.colorModel.hsl = color.c; 423 this.application.ninja.colorController.colorModel.hsl = color.c;
424 break; 424 break;
425 case 'hex': 425 case 'hex':
426 //TODO: Check if anything needed here 426 //TODO: Check if anything needed here
427 break; 427 break;
428 case 'gradient': 428 case 'gradient':
429 this.application.ninja.colorController.colorModel.gradient = color.c; 429 this.application.ninja.colorController.colorModel.gradient = color.c;
430 break; 430 break;
431 case 'hsv': 431 case 'hsv':
432 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; 432 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'};
433 this.application.ninja.colorController.colorModel.hsv = color.c; 433 this.application.ninja.colorController.colorModel.hsv = color.c;
434 break; 434 break;
435 default: 435 default:
436 this.application.ninja.colorController.colorModel.applyNoColor(true); 436 this.application.ninja.colorController.colorModel.applyNoColor(true);
437 break; 437 break;
438 } 438 }
439 } 439 }
440 } 440 }
441 }, 441 },