From fbd9d2492aeaef392ad59792825b8757d6c363fc Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Fri, 15 Jun 2012 15:14:34 -0700 Subject: Fixing apply 'no color' This should fix canvas and standard DOM elements including the root (body or template wrapper). --- js/panels/properties.reel/properties.js | 4 ++-- js/panels/properties.reel/sections/custom.reel/custom.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'js/panels/properties.reel') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 43c92b74..fcd0ab01 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -367,7 +367,7 @@ exports.Properties = Montage.create(Component, { } } else { this.application.ninja.colorController.colorModel.alpha = {value: 1, wasSetByCode: true, type: 'change'}; - this.application.ninja.colorController.colorModel.applyNoColor(); + this.application.ninja.colorController.colorModel.applyNoColor(true); } } } @@ -397,7 +397,7 @@ exports.Properties = Montage.create(Component, { this.application.ninja.colorController.colorModel.hsv = color.c; break; default: - this.application.ninja.colorController.colorModel.applyNoColor(); + this.application.ninja.colorController.colorModel.applyNoColor(true); break; } } diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js index c599dcb0..08434b01 100755 --- a/js/panels/properties.reel/sections/custom.reel/custom.js +++ b/js/panels/properties.reel/sections/custom.reel/custom.js @@ -116,7 +116,11 @@ exports.CustomSection = Montage.create(Component, { value: function(event) { // Change the stage color for now //console.log(this, event); - ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); + if (event._event.color && event._event.color.css) { + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, [event._event.color.css], "Change", "pi", ''); + } else { + ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, ['none'], "Change", "pi", ''); + } /* var propEvent = document.createEvent("CustomEvent"); propEvent.initEvent("propertyChange", true, true); -- cgit v1.2.3