From 648ee61ae84216d0236e0dbc211addc13b2cfa3a Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:52:06 -0700 Subject: Expand tabs --- js/panels/properties.reel/properties.js | 66 ++++++++++++++++----------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'js/panels/properties.reel/properties.js') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index b83ae170..1318a9b3 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -320,18 +320,18 @@ exports.Properties = Montage.create(Component, { // Root element color chip if(isRoot) { - // + // var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"]; // if (ElementsMediator.getProperty(el, "background-image")) { - rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); - if (!rootBackgroundColor.mode) rootBackgroundColor = null; + rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; } else if (ElementsMediator.getProperty(el, "background-color")){ - rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); - if (!rootBackgroundColor.mode) rootBackgroundColor = null; + rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; } else if (ElementsMediator.getProperty(el, "background")){ - rootBackgroundColor = ElementsMediator.getProperty(el, "background"); - if (!rootBackgroundColor.mode) rootBackgroundColor = null; + rootBackgroundColor = ElementsMediator.getProperty(el, "background"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; } // if(rootBackgroundColor) { @@ -344,7 +344,7 @@ exports.Properties = Montage.create(Component, { - var previousInput = this.application.ninja.colorController.colorModel.input; + var previousInput = this.application.ninja.colorController.colorModel.input; customPI = PiData[this.customPi]; // Get all the custom section for the custom PI for(var i = 0, customSec; customSec = customPI[i]; i++) { @@ -411,31 +411,31 @@ exports.Properties = Montage.create(Component, { if (previousInput === 'chip') return; this.application.ninja.colorController.colorModel.input = previousInput; var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1]; - color.c.wasSetByCode = true; - color.c.type = 'change'; - switch (color.m) { - case 'rgb': - this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; - this.application.ninja.colorController.colorModel.rgb = color.c; - break; - case 'hsl': - this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; - this.application.ninja.colorController.colorModel.hsl = color.c; - break; - case 'hex': - //TODO: Check if anything needed here - break; - case 'gradient': - this.application.ninja.colorController.colorModel.gradient = color.c; - break; - case 'hsv': - this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; - this.application.ninja.colorController.colorModel.hsv = color.c; - break; - default: - this.application.ninja.colorController.colorModel.applyNoColor(true); - break; - } + color.c.wasSetByCode = true; + color.c.type = 'change'; + switch (color.m) { + case 'rgb': + this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; + this.application.ninja.colorController.colorModel.rgb = color.c; + break; + case 'hsl': + this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; + this.application.ninja.colorController.colorModel.hsl = color.c; + break; + case 'hex': + //TODO: Check if anything needed here + break; + case 'gradient': + this.application.ninja.colorController.colorModel.gradient = color.c; + break; + case 'hsv': + this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'}; + this.application.ninja.colorController.colorModel.hsv = color.c; + break; + default: + this.application.ninja.colorController.colorModel.applyNoColor(true); + break; + } } } }, -- cgit v1.2.3 From 04343eda8c2f870b0da55cfdc8003c99fe1cc4de Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Fri, 6 Jul 2012 11:53:10 -0700 Subject: Remove trailing spaces --- js/panels/properties.reel/properties.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/panels/properties.reel/properties.js') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 1318a9b3..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, { NJevent("updatedID",this.application.ninja.selectedElements[0]); } }, - + handleKeyup: { value: function(event) { if(event.keyCode === 13) { event.target.blur(); - } + } } }, -- cgit v1.2.3