From e53f325cf80694d5895cc36c36d1f66c5a44e1d9 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 30 Jan 2012 11:21:15 -0800 Subject: CSSPanel Updates - Add new original CSS error icon --- js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css index ff70b5b6..27d19e58 100644 --- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css +++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.css @@ -400,7 +400,7 @@ .nj-css-error:not(.nj-css-no-error) { background-repeat: no-repeat; background-position: 3px 2px; - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAMtJREFUGJV1kM0KAXEUxc/SWh7MM0zJE3gQCxM2EpJ8bEiNjWHhBWYjYkUkRdQoGde5f2Q03PrV6ZzTrXuB0MgQiU0ba0U1/k3gwBYXoqj+WeKG2LaBgwxYJEbTixa7yMyLLPlLw6xATS9SXDWx25cZ7sYG1ep9b3OR8h3cTyUWtyMylnMNcqGn2WdbHQs94FqFnPtxg2r1NHsfkTx0EMiEG7IMpy2D0fSOPWbsgD/zzEtoik323hP75THTDvJpVHIW5I1t4aaEPe08AF+CuEXWXJtHAAAAAElFTkSuQmCC); + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAALCAYAAABGbhwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw%2FeHBhY2tldCBiZWdpbj0i77u%2FIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8%2BIDx4OnhtcG1ldGEgeG1sbnM6e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i65XDZ36%2Bz5GFgWZr75fjPDhBD4C%2BucjWgaphjQdTgK%2FfPi5a%2FGpPDtjEVjERyqKlag%2FlY8gHPsfzSwPbQgbDyfIs6vURa3EKK8Jf6jmhUy51yiWDlBUDED2NF0JKGQS3IPVn4ATXqIL0EYJgwD42YQG4quE45EggOtCwbWrUM1Ej%2F0jkXDAYaOtOa6iIH2YSQOBugPj4KN3aFdnIThkprynoeUYjtwIRO0hCLxiU3wp12odgl0AXhUa3VQ0xoWCqEApiNhEpFzt7Tm%2F4Tzo9kGvtq4UjNzqJB1mswURvNoqayP57V7KcB7HfZnE8v%2BHYtZtmiGcBzqQ1TSZUPP85HVlo1MfCaX94WPpSO83qwO6wbWCTtBQocoD70eDgZncw3Z%2BC3AAFMzlxlnnpevAAAAAElFTkSuQmCC); opacity: 0.5; } .nj-editing.nj-css-error { -- cgit v1.2.3 From 6066b9bda2990c9d6b4311d221b0d0c773b20f60 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 31 Jan 2012 10:28:39 -0800 Subject: Merging Jose's colorchip change. Signed-off-by: Nivesh Rajbhandari --- js/panels/Color/colorchippopup.reel/colorchippopup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/panels') diff --git a/js/panels/Color/colorchippopup.reel/colorchippopup.js b/js/panels/Color/colorchippopup.reel/colorchippopup.js index 03e14b28..05bcb447 100644 --- a/js/panels/Color/colorchippopup.reel/colorchippopup.js +++ b/js/panels/Color/colorchippopup.reel/colorchippopup.js @@ -109,7 +109,7 @@ exports.ColorChipPopup = Montage.create(Component, { this.cc_hexinput.labelFunction = this._hexLabel.bind(this); this.cc_hexinput.inputFunction = this._hexInput.bind(this); // - if (this.application.ninja.colorController.colorView.currentChip && this.application.ninja.colorController.colorView.currentChip.colorValue.a) { + if (this.application.ninja.colorController.colorView.currentChip && this.application.ninja.colorController.colorView.currentChip.colorValue && this.application.ninja.colorController.colorView.currentChip.colorValue.a) { this.combo.slider.value = Math.round(this.application.ninja.colorController.colorView.currentChip.colorValue.a*100); } else { this.combo.slider.value = 100; -- cgit v1.2.3 From 12371bb25ca51286c19a426611d9b7db369bec87 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 31 Jan 2012 11:09:21 -0800 Subject: Support stage in PI's 3d section. Signed-off-by: Nivesh Rajbhandari --- .../sections/three-d-view.reel/three-d-view.js | 63 ++++++++++++++-------- 1 file changed, 41 insertions(+), 22 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.js b/js/panels/properties/sections/three-d-view.reel/three-d-view.js index 38dbb110..dda9f993 100644 --- a/js/panels/properties/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.js @@ -40,19 +40,16 @@ exports.ThreeD = Montage.create(Component, { else { this.inGlobalMode = true; - if(this.application.ninja.selectedElements.length) + var item = this.item; + if(item) { - var item = this.application.ninja.selectedElements[0]._element; - if(item) - { - this.x3D = item.elementModel.props3D.x3D; - this.y3D = item.elementModel.props3D.y3D; - this.z3D = item.elementModel.props3D.z3D; - - this.xAngle = item.elementModel.props3D.xAngle; - this.yAngle = item.elementModel.props3D.yAngle; - this.zAngle = item.elementModel.props3D.zAngle; - } + this.x3D = item.elementModel.props3D.x3D; + this.y3D = item.elementModel.props3D.y3D; + this.z3D = item.elementModel.props3D.z3D; + + this.xAngle = item.elementModel.props3D.xAngle; + this.yAngle = item.elementModel.props3D.yAngle; + this.zAngle = item.elementModel.props3D.zAngle; } } } @@ -98,6 +95,10 @@ exports.ThreeD = Montage.create(Component, { } }, + item: { + value: null + }, + handleChange: { value: function(event) { if(event.wasSetByCode) { @@ -106,7 +107,7 @@ exports.ThreeD = Montage.create(Component, { this.apply3DProperties(event.currentTarget.identifier, event.currentTarget, - this.application.ninja.selectedElements[0]._element, + this.item, this.inGlobalMode, false); } @@ -120,7 +121,7 @@ exports.ThreeD = Montage.create(Component, { this.apply3DProperties(event.currentTarget.identifier, event.currentTarget, - this.application.ninja.selectedElements[0]._element, + this.item, this.inGlobalMode, true); } @@ -128,9 +129,8 @@ exports.ThreeD = Montage.create(Component, { apply3DProperties : { value : function(prop, value, item, inGlobalMode, isChanging){ - // TODO - May want to use mediator instead - var curMat = item.elementModel.props3D.matrix3d; - var delta = value.value - item.elementModel.props3D[prop]; + var curMat = this.application.ninja.elementMediator.getMatrix(item); + var delta = value.value - this.application.ninja.elementMediator.get3DProperty(item, prop); var xFormMat = Matrix.I(4); switch (prop) @@ -183,12 +183,31 @@ exports.ThreeD = Montage.create(Component, { templateDidLoad : { value: function() { - Object.defineBinding(this, "axisMode", { - boundObject: this.axisModeGroupControl, - boundObjectPropertyPath: "selectedIndex", - oneway: false - }); + Object.defineBinding(this, "axisMode", { + boundObject: this.axisModeGroupControl, + boundObjectPropertyPath: "selectedIndex", + oneway: false + }); + + Object.defineBinding(this, "item", { + boundObject: this, + boundObjectPropertyPath: "application.ninja.selectedElements", + boundValueMutator: this._getSelectedItem + }); + } + }, + _getSelectedItem: { + value: function(els) + { + if(els.length) + { + return els[0]._element || els[0]; + } + else + { + return this.boundObject.application.ninja.currentDocument.documentRoot; + } } }, -- cgit v1.2.3 From c0f43749523f4720ca4c8942fa9ac17753d93a67 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 31 Jan 2012 15:01:04 -0800 Subject: Fixing 3d section of the PI. Signed-off-by: Nivesh Rajbhandari --- .../sections/three-d-view.reel/three-d-view.html | 12 +++++----- .../sections/three-d-view.reel/three-d-view.js | 27 ++++++++++++++++++++-- 2 files changed, 31 insertions(+), 8 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.html b/js/panels/properties/sections/three-d-view.reel/three-d-view.html index 1e24cb55..11a5b3f2 100644 --- a/js/panels/properties/sections/three-d-view.reel/three-d-view.html +++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.html @@ -39,7 +39,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "value": { "boundObject": {"@": "owner"}, "boundObjectPropertyPath": "x3D", - "oneway": false + "oneway": true } }, "listeners": [ @@ -68,7 +68,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "value": { "boundObject": {"@": "owner"}, "boundObjectPropertyPath": "y3D", - "oneway": false + "oneway": true } }, "listeners": [ @@ -97,7 +97,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "value": { "boundObject": {"@": "owner"}, "boundObjectPropertyPath": "z3D", - "oneway": false + "oneway": true } }, "listeners": [ @@ -128,7 +128,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "value": { "boundObject": {"@": "owner"}, "boundObjectPropertyPath": "xAngle", - "oneway": false + "oneway": true } }, "listeners": [ @@ -159,7 +159,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "value": { "boundObject": {"@": "owner"}, "boundObjectPropertyPath": "yAngle", - "oneway": false + "oneway": true } }, "listeners": [ @@ -190,7 +190,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "value": { "boundObject": {"@": "owner"}, "boundObjectPropertyPath": "zAngle", - "oneway": false + "oneway": true } }, "listeners": [ diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.js b/js/panels/properties/sections/three-d-view.reel/three-d-view.js index dda9f993..96053490 100644 --- a/js/panels/properties/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.js @@ -99,6 +99,14 @@ exports.ThreeD = Montage.create(Component, { value: null }, + _curMat: { + value: null + }, + + _curProp: { + value: null + }, + handleChange: { value: function(event) { if(event.wasSetByCode) { @@ -110,6 +118,9 @@ exports.ThreeD = Montage.create(Component, { this.item, this.inGlobalMode, false); + + this._curMat = null; + this._curProp = null; } }, @@ -129,8 +140,20 @@ exports.ThreeD = Montage.create(Component, { apply3DProperties : { value : function(prop, value, item, inGlobalMode, isChanging){ - var curMat = this.application.ninja.elementMediator.getMatrix(item); - var delta = value.value - this.application.ninja.elementMediator.get3DProperty(item, prop); + if(!this._curMat) + { + this._curMat = this.application.ninja.elementMediator.getMatrix(item); + } + var curMat = this._curMat; + var delta = value.value; + if(inGlobalMode) + { + if(!this._curProp) + { + this._curProp = this.application.ninja.elementMediator.get3DProperty(item, prop); + } + delta -= this._curProp; + } var xFormMat = Matrix.I(4); switch (prop) -- cgit v1.2.3 From 89d64cf06e170c3c50b02eeadd9dcf10d6efe1a3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 2 Feb 2012 13:22:30 -0800 Subject: Updating Shapes PI to support corner radii. Also fixed PI bug where we were always updating custom section 0. Signed-off-by: Nivesh Rajbhandari --- js/panels/properties/content.reel/content.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/panels') diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js index fe6faef8..3cedee6d 100644 --- a/js/panels/properties/content.reel/content.js +++ b/js/panels/properties/content.reel/content.js @@ -182,8 +182,11 @@ exports.Content = Montage.create(Component, { if(control.prop !== "border-color" && control.prop !== "background-color") { var currentValue = ElementsMediator.getProperty(el, control.prop, control.valueMutator); - currentValue ? currentValue = currentValue : currentValue = control.defaultValue; - this.customSections[0].content.controls[control.id] = currentValue; + if(currentValue === null) + { + currentValue = control.defaultValue; + } + this.customSections[i].content.controls[control.id] = currentValue; } } } -- cgit v1.2.3