From 648ee61ae84216d0236e0dbc211addc13b2cfa3a Mon Sep 17 00:00:00 2001
From: Kris Kowal
Date: Fri, 6 Jul 2012 11:52:06 -0700
Subject: Expand tabs
---
js/panels/properties.reel/properties.css | 8 +--
js/panels/properties.reel/properties.html | 6 +-
js/panels/properties.reel/properties.js | 66 +++++++++++-----------
.../properties.reel/sections/custom.reel/custom.js | 28 ++++-----
4 files changed, 54 insertions(+), 54 deletions(-)
(limited to 'js/panels/properties.reel')
diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css
index 3c6b1a61..e5d698b3 100755
--- a/js/panels/properties.reel/properties.css
+++ b/js/panels/properties.reel/properties.css
@@ -276,10 +276,10 @@ padding-right:6px;
}
.propertiesPanel .colortoolbar .chipContainer {
- margin-top: 2px;
- background: url(../../../../../images/colorpanel/transparent.png) repeat;
- width: 40px;
- height: 20px;
+ margin-top: 2px;
+ background: url(../../../../../images/colorpanel/transparent.png) repeat;
+ width: 40px;
+ height: 20px;
}
.propertiesPanel .button:active {
diff --git a/js/panels/properties.reel/properties.html b/js/panels/properties.reel/properties.html
index 5ec78c05..1cb3dd99 100755
--- a/js/panels/properties.reel/properties.html
+++ b/js/panels/properties.reel/properties.html
@@ -30,7 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
-->
-
+
+ }
+
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index b83ae170..1318a9b3 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -320,18 +320,18 @@ exports.Properties = Montage.create(Component, {
// Root element color chip
if(isRoot) {
- //
+ //
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;
+ 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;
+ 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;
+ rootBackgroundColor = ElementsMediator.getProperty(el, "background");
+ if (!rootBackgroundColor.mode) rootBackgroundColor = null;
}
//
if(rootBackgroundColor) {
@@ -344,7 +344,7 @@ exports.Properties = Montage.create(Component, {
- var previousInput = this.application.ninja.colorController.colorModel.input;
+ 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++) {
@@ -411,31 +411,31 @@ exports.Properties = Montage.create(Component, {
if (previousInput === 'chip') return;
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(true);
- break;
- }
+ 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(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 0616da59..17b64dc2 100755
--- a/js/panels/properties.reel/sections/custom.reel/custom.js
+++ b/js/panels/properties.reel/sections/custom.reel/custom.js
@@ -117,20 +117,20 @@ exports.CustomSection = Montage.create(Component, {
},
handleChanging: {
- value:function(event) {
+ value:function(event) {
var obj = event.currentTarget;
this._dispatchPropEvent({"type": "changing", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj});
- }
- },
+ }
+ },
handleChange: {
- value:function(event) {
+ value:function(event) {
if(event._event.wasSetByCode) return;
var obj = event.currentTarget;
this._dispatchPropEvent({"type": "change", "id": obj.id, "prop": obj.prop, "value": obj.value, "control": obj});
- }
- },
+ }
+ },
/**
* Color change handler. Hard coding the stage for now since only the stage PI uses this color chip
@@ -141,21 +141,21 @@ exports.CustomSection = Montage.create(Component, {
//console.log(this, event);
if (event._event.colorMode !== 'gradient' && event._event.color) {
- ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', [event._event.color.css], "Change", "pi", '');
- ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", '');
+ ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', [event._event.color.css], "Change", "pi", '');
+ ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", '');
} else if (event._event.color) {
- ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', [event._event.color.css], "Change", "pi", '');
- ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", '');
+ ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', [event._event.color.css], "Change", "pi", '');
+ ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", '');
} else {
- ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", '');
- ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "Change", "pi", '');
+ ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-image', ['none'], "Change", "pi", '');
+ ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], 'background-color', ['none'], "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", '');
+ 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", '');
+ ElementsMediator.setProperty([this.application.ninja.currentDocument.model.documentRoot], this.id, ['none'], "Change", "pi", '');
}
*/
/*
--
cgit v1.2.3