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(-) 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