From 1a759361b82127f9d5c1428dc889fffdf2daaf86 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Thu, 3 May 2012 15:11:56 -0700 Subject: First round of moving color chips into the sub tools. Shape and Pen tool now have chips in the sub tool bar. Still need to complete adding chips to the Brush tool and finalizing the subtool bar layout to our spec for all of the subtools. --- .../tools-properties/rect-properties.reel/rect-properties.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'js/components/tools-properties/rect-properties.reel') diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.js b/js/components/tools-properties/rect-properties.reel/rect-properties.js index f023f4bb..c1cb3945 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.js +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.js @@ -42,6 +42,14 @@ exports.RectProperties = Montage.create(ToolProperties, { }, // Public API + fill: { + get: function () { return this.base.fill; } + }, + + stroke: { + get: function () { return this.base.stroke; } + }, + use3D: { get: function() { return this.base._use3D; } }, @@ -125,6 +133,4 @@ exports.RectProperties = Montage.create(ToolProperties, { } } - - }); \ No newline at end of file -- cgit v1.2.3 From 7dd942b6e19d2d7a779bc50e7bf4c8f8780b8f3a Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Wed, 9 May 2012 14:19:14 -0700 Subject: Correct layout and styling for the shape tool and its sub tools --- .../tools-properties/rect-properties.reel/rect-properties.html | 2 -- 1 file changed, 2 deletions(-) (limited to 'js/components/tools-properties/rect-properties.reel') diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.html b/js/components/tools-properties/rect-properties.reel/rect-properties.html index 01f2b1da..43dae547 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.html +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html @@ -75,7 +75,6 @@
-
@@ -87,5 +86,4 @@
- \ No newline at end of file -- cgit v1.2.3 From 18370abcf406c6ab36d5c5f2613cb79e756ff6d2 Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Wed, 9 May 2012 18:07:32 -0700 Subject: -Consolidated many redundant css classes used in the tool options bars --- .../tools-properties/rect-properties.reel/rect-properties.css | 2 +- .../tools-properties/rect-properties.reel/rect-properties.html | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'js/components/tools-properties/rect-properties.reel') diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.css b/js/components/tools-properties/rect-properties.reel/rect-properties.css index cbd9dde8..c186d895 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.css +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.css @@ -16,7 +16,7 @@ } .rectProperties .subToolButton { - float:left; + margin-right: 7px; } .rectProperties .button:hover diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.html b/js/components/tools-properties/rect-properties.reel/rect-properties.html index 43dae547..6caef4b3 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.html +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html @@ -74,16 +74,16 @@ -
+
-
+
-
+
-
+
-
+
\ No newline at end of file -- cgit v1.2.3 From 3be15e2076f2d3d46862bbc0ea078b9bf2e161fe Mon Sep 17 00:00:00 2001 From: John Mayhew Date: Thu, 10 May 2012 11:17:42 -0700 Subject: -moved sel tool images to proper folder -finished styling shape tool options -added new icons for shape tool --- .../tools-properties/rect-properties.reel/rect-properties.css | 4 +++- .../tools-properties/rect-properties.reel/rect-properties.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'js/components/tools-properties/rect-properties.reel') diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.css b/js/components/tools-properties/rect-properties.reel/rect-properties.css index c186d895..dcb478e7 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.css +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.css @@ -12,7 +12,9 @@ opacity: 0.7; width: 17px; height: 18px; - margin-right: 10px; + margin-right: 8px; + margin-left: 8px; + margin-top: 1px; } .rectProperties .subToolButton { diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.html b/js/components/tools-properties/rect-properties.reel/rect-properties.html index 6caef4b3..42746caa 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.html +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html @@ -75,7 +75,7 @@
- +
-- cgit v1.2.3 From 43994432117686f18eb1783418ef83744ae01d79 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 17 May 2012 15:43:40 -0700 Subject: Fixed border radius hot-text linking that was broken by update to montage v.10. Signed-off-by: Nivesh Rajbhandari --- .../rect-properties.reel/rect-properties.html | 49 ++++++++++++-- .../rect-properties.reel/rect-properties.js | 79 +++++++++------------- 2 files changed, 74 insertions(+), 54 deletions(-) (limited to 'js/components/tools-properties/rect-properties.reel') diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.html b/js/components/tools-properties/rect-properties.reel/rect-properties.html index 42746caa..7aa91314 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.html +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html @@ -15,8 +15,19 @@ "prototype": "js/components/hottextunit.reel[HotTextUnit]", "properties": { "element": {"#": "TLRadiusControl"}, - "acceptableUnits" : ["px", "pt", "%"] - } + "acceptableUnits" : ["px", "pt", "%"], + "identifier": "TLRadiusControl" + }, + "listeners": [ + { + "type": "change", + "listener": {"@": "owner"} + }, + { + "type": "changing", + "listener": {"@": "owner"} + } + ] }, "hottext2": { @@ -25,7 +36,13 @@ "element": {"#": "TRRadiusControl"}, "acceptableUnits" : ["px", "pt", "%"], "enabled": false - } + }, + "listeners": [ + { + "type": "change", + "listener": {"@": "owner"} + } + ] }, "hottext3": { @@ -34,7 +51,13 @@ "element": {"#": "BLRadiusControl"}, "acceptableUnits" : ["px", "pt", "%"], "enabled": false - } + }, + "listeners": [ + { + "type": "change", + "listener": {"@": "owner"} + } + ] }, "hottext4": { @@ -43,7 +66,13 @@ "element": {"#": "BRRadiusControl"}, "acceptableUnits" : ["px", "pt", "%"], "enabled": false - } + }, + "listeners": [ + { + "type": "change", + "listener": {"@": "owner"} + } + ] }, "lockButton": { @@ -53,8 +82,14 @@ "pressed": true, "pressedClass": "lockUp", "preventFocus": true, - "identifier": "ratio" - } + "identifier": "lockButton" + }, + "listeners": [ + { + "type": "action", + "listener": {"@": "owner"} + } + ] }, "owner": { diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.js b/js/components/tools-properties/rect-properties.reel/rect-properties.js index c1cb3945..2f8ea4dd 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.js +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.js @@ -19,12 +19,6 @@ exports.RectProperties = Montage.create(ToolProperties, { _subPrepare: { value: function() { - this.lockButton.identifier = "lockButton"; - this.lockButton.addEventListener("action", this, false); - - this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); - this._setCap([this.TLRadiusControl,this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); - } }, @@ -33,11 +27,8 @@ exports.RectProperties = Montage.create(ToolProperties, { this.TRRadiusControl.enabled = this.BLRadiusControl.enabled = this.BRRadiusControl.enabled = !this.lockButton.pressed; if(this.lockButton.pressed) { - this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); - } else { - this._removeBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); + this._syncRadii(this.TLRadiusControl.value, this.TLRadiusControl.units); } - } }, @@ -80,57 +71,51 @@ exports.RectProperties = Montage.create(ToolProperties, { get: function() { return this.base._fillMaterial.value; } }, - _setBindings: { - value: function(els) { - var that = this; - els.forEach(function(el) { - Object.defineBinding(el, "value", { - boundObject: that.TLRadiusControl, - boundObjectPropertyPath: "value", - boundValueMutator: function(value) { - if (typeof value === "string") { - return parseFloat(value); - } - - return value; - } - }); - - Object.defineBinding(el, "units", { - boundObject: that.TLRadiusControl, - boundObjectPropertyPath: "units" - }); - }); - } - }, + handleChanging: { + value: function(event) { + if(event.wasSetByCode) { + return; + } - _removeBindings: { - value: function(els) { - els.forEach(function(el) { - Object.deleteBindings(el); - }); + this._setBorderRadius(event); } }, - _setCap: { - value: function(els) { - var that = this; - els.forEach(function(el) { - el.addEventListener("change", that, false); - }); + handleChange: { + value: function(event) { + if(event.wasSetByCode) { + return; + } + + this._setBorderRadius(event); } }, - handleChange: { + _setBorderRadius: { value: function(event) { var hotTxt = event.currentTarget; if(hotTxt.units === "%") { if(hotTxt.value > 50) { hotTxt.maxValue = 50; } - return hotTxt.value; } - + + if(this.lockButton.pressed && (this.TLRadiusControl === hotTxt)) { + this._syncRadii(hotTxt.value, hotTxt.units); + } + } + }, + + _syncRadii: { + value: function(value, units) { + this.TRRadiusControl.value = value; + this.BLRadiusControl.value = value; + this.BRRadiusControl.value = value; + + this.TRRadiusControl.units = units; + this.BLRadiusControl.units = units; + this.BRRadiusControl.units = units; } } + }); \ No newline at end of file -- cgit v1.2.3 From 6636b2729b421740e49142b7e8b1a76540508306 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 17 May 2012 15:46:56 -0700 Subject: Removed unneeded identifier. Signed-off-by: Nivesh Rajbhandari --- .../tools-properties/rect-properties.reel/rect-properties.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'js/components/tools-properties/rect-properties.reel') diff --git a/js/components/tools-properties/rect-properties.reel/rect-properties.html b/js/components/tools-properties/rect-properties.reel/rect-properties.html index 7aa91314..a7bf6a7c 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.html +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html @@ -15,8 +15,7 @@ "prototype": "js/components/hottextunit.reel[HotTextUnit]", "properties": { "element": {"#": "TLRadiusControl"}, - "acceptableUnits" : ["px", "pt", "%"], - "identifier": "TLRadiusControl" + "acceptableUnits" : ["px", "pt", "%"] }, "listeners": [ { -- cgit v1.2.3