aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-15 01:09:57 -0700
committerValerio Virgillito2012-03-15 01:09:57 -0700
commit1d0a4ae3e1a051c7cf1ac02ebbc03f48d1cdfb6c (patch)
tree87037b10fef9b50cffc9e102c16f01e0ecf99681 /js/panels
parentda5dfc8863ad47c48414ff1fdacbacdb91abd30c (diff)
parente6bfd7fb3d3324bea5dbc05350832a9e25c6c00d (diff)
downloadninja-1d0a4ae3e1a051c7cf1ac02ebbc03f48d1cdfb6c.tar.gz
Merge branch 'refs/heads/master' into pi-fixes
Diffstat (limited to 'js/panels')
-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 },