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.js29
1 files changed, 28 insertions, 1 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index f35bf2e0..40e9b86a 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -287,7 +287,7 @@ exports.Properties = Montage.create(Component, {
287 this.customPi = el.elementModel.pi; 287 this.customPi = el.elementModel.pi;
288 this.displayCustomProperties(el, el.elementModel.pi); 288 this.displayCustomProperties(el, el.elementModel.pi);
289 } 289 }
290 290 var previousInput = this.application.ninja.colorController.colorModel.input;
291 customPI = PiData[this.customPi]; 291 customPI = PiData[this.customPi];
292 // Get all the custom section for the custom PI 292 // Get all the custom section for the custom PI
293 for(var i = 0, customSec; customSec = customPI[i]; i++) { 293 for(var i = 0, customSec; customSec = customPI[i]; i++) {
@@ -356,6 +356,33 @@ exports.Properties = Montage.create(Component, {
356 } 356 }
357 } 357 }
358 } 358 }
359 this.application.ninja.colorController.colorModel.input = previousInput;
360 var color = this.application.ninja.colorController.colorModel.colorHistory[previousInput][this.application.ninja.colorController.colorModel.colorHistory[previousInput].length-1];
361 color.c.wasSetByCode = true;
362 color.c.type = 'change';
363 switch (color.m) {
364 case 'rgb':
365 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'};
366 this.application.ninja.colorController.colorModel.rgb = color.c;
367 break;
368 case 'hsl':
369 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'};
370 this.application.ninja.colorController.colorModel.hsl = color.c;
371 break;
372 case 'hex':
373 //TODO: Check if anything needed here
374 break;
375 case 'gradient':
376 this.application.ninja.colorController.colorModel.gradient = color.c;
377 break;
378 case 'hsv':
379 this.application.ninja.colorController.colorModel.alpha = {value: color.a, wasSetByCode: true, type: 'change'};
380 this.application.ninja.colorController.colorModel.hsv = color.c;
381 break;
382 default:
383 this.application.ninja.colorController.colorModel.applyNoColor();
384 break;
385 }
359 } 386 }
360 } 387 }
361 }, 388 },