From 929007fa4a5e7ddc2d52a9a389e7b07c8d7a5dbd Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Tue, 13 Mar 2012 16:08:39 -0700 Subject: Temp Fix for: IKNINJA-1078 --- js/panels/properties.reel/properties.js | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 947d7937..580d945d 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -283,7 +283,7 @@ exports.Properties = Montage.create(Component, { this.customPi = el.elementModel.pi; this.displayCustomProperties(el, el.elementModel.pi); } - + 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++) { @@ -352,6 +352,33 @@ exports.Properties = Montage.create(Component, { } } } + 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(); + break; + } } } }, -- cgit v1.2.3 From e07ec7dd1a4b8df747f6af0d54fe95e3a237f0c8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 14 Mar 2012 11:47:06 -0700 Subject: Removing the name attribute from the PI. Fixing the ID and Class attribute from the PI Signed-off-by: Valerio Virgillito --- js/panels/properties.reel/properties.html | 70 ++++++------------------------- js/panels/properties.reel/properties.js | 64 +++++++++++++++------------- 2 files changed, 47 insertions(+), 87 deletions(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html index 72a6def6..bcf54b95 100755 --- a/js/panels/properties.reel/properties.html +++ b/js/panels/properties.reel/properties.html @@ -10,35 +10,19 @@