From c1a3bfcc53e4526d5bb54687ba18ccaaefa96fc2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 28 Jun 2012 11:49:45 -0700 Subject: Fixing body PI background getter --- js/panels/properties.reel/properties.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index c8383307..b2941fe8 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js @@ -296,9 +296,20 @@ exports.Properties = Montage.create(Component, { // Root element color chip if(isRoot) { - var backgroundChip = this.customSections[0].content.controls["background"]; - var rootBackgroundColor = ElementsMediator.getProperty(el, "background"); - + // + var rootBackgroundColor, backgroundChip = this.customSections[0].content.controls["background"]; + // + if (ElementsMediator.getProperty(el, "background-image")) { + rootBackgroundColor = ElementsMediator.getProperty(el, "background-image"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; + } else if (ElementsMediator.getProperty(el, "background-color")){ + rootBackgroundColor = ElementsMediator.getProperty(el, "background-color"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; + } else if (ElementsMediator.getProperty(el, "background")){ + rootBackgroundColor = ElementsMediator.getProperty(el, "background"); + if (!rootBackgroundColor.mode) rootBackgroundColor = null; + } + // if(rootBackgroundColor) { backgroundChip.color = rootBackgroundColor; } else { -- cgit v1.2.3