diff options
Diffstat (limited to 'js/components/tools-properties/rect-properties.reel')
3 files changed, 89 insertions, 64 deletions
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..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,11 +12,13 @@ | |||
12 | opacity: 0.7; | 12 | opacity: 0.7; |
13 | width: 17px; | 13 | width: 17px; |
14 | height: 18px; | 14 | height: 18px; |
15 | margin-right: 10px; | 15 | margin-right: 8px; |
16 | margin-left: 8px; | ||
17 | margin-top: 1px; | ||
16 | } | 18 | } |
17 | 19 | ||
18 | .rectProperties .subToolButton { | 20 | .rectProperties .subToolButton { |
19 | float:left; | 21 | margin-right: 7px; |
20 | } | 22 | } |
21 | 23 | ||
22 | .rectProperties .button:hover | 24 | .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 01f2b1da..a7bf6a7c 100755 --- a/js/components/tools-properties/rect-properties.reel/rect-properties.html +++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html | |||
@@ -16,7 +16,17 @@ | |||
16 | "properties": { | 16 | "properties": { |
17 | "element": {"#": "TLRadiusControl"}, | 17 | "element": {"#": "TLRadiusControl"}, |
18 | "acceptableUnits" : ["px", "pt", "%"] | 18 | "acceptableUnits" : ["px", "pt", "%"] |
19 | } | 19 | }, |
20 | "listeners": [ | ||
21 | { | ||
22 | "type": "change", | ||
23 | "listener": {"@": "owner"} | ||
24 | }, | ||
25 | { | ||
26 | "type": "changing", | ||
27 | "listener": {"@": "owner"} | ||
28 | } | ||
29 | ] | ||
20 | }, | 30 | }, |
21 | 31 | ||
22 | "hottext2": { | 32 | "hottext2": { |
@@ -25,7 +35,13 @@ | |||
25 | "element": {"#": "TRRadiusControl"}, | 35 | "element": {"#": "TRRadiusControl"}, |
26 | "acceptableUnits" : ["px", "pt", "%"], | 36 | "acceptableUnits" : ["px", "pt", "%"], |
27 | "enabled": false | 37 | "enabled": false |
28 | } | 38 | }, |
39 | "listeners": [ | ||
40 | { | ||
41 | "type": "change", | ||
42 | "listener": {"@": "owner"} | ||
43 | } | ||
44 | ] | ||
29 | }, | 45 | }, |
30 | 46 | ||
31 | "hottext3": { | 47 | "hottext3": { |
@@ -34,7 +50,13 @@ | |||
34 | "element": {"#": "BLRadiusControl"}, | 50 | "element": {"#": "BLRadiusControl"}, |
35 | "acceptableUnits" : ["px", "pt", "%"], | 51 | "acceptableUnits" : ["px", "pt", "%"], |
36 | "enabled": false | 52 | "enabled": false |
37 | } | 53 | }, |
54 | "listeners": [ | ||
55 | { | ||
56 | "type": "change", | ||
57 | "listener": {"@": "owner"} | ||
58 | } | ||
59 | ] | ||
38 | }, | 60 | }, |
39 | 61 | ||
40 | "hottext4": { | 62 | "hottext4": { |
@@ -43,7 +65,13 @@ | |||
43 | "element": {"#": "BRRadiusControl"}, | 65 | "element": {"#": "BRRadiusControl"}, |
44 | "acceptableUnits" : ["px", "pt", "%"], | 66 | "acceptableUnits" : ["px", "pt", "%"], |
45 | "enabled": false | 67 | "enabled": false |
46 | } | 68 | }, |
69 | "listeners": [ | ||
70 | { | ||
71 | "type": "change", | ||
72 | "listener": {"@": "owner"} | ||
73 | } | ||
74 | ] | ||
47 | }, | 75 | }, |
48 | 76 | ||
49 | "lockButton": { | 77 | "lockButton": { |
@@ -53,8 +81,14 @@ | |||
53 | "pressed": true, | 81 | "pressed": true, |
54 | "pressedClass": "lockUp", | 82 | "pressedClass": "lockUp", |
55 | "preventFocus": true, | 83 | "preventFocus": true, |
56 | "identifier": "ratio" | 84 | "identifier": "lockButton" |
57 | } | 85 | }, |
86 | "listeners": [ | ||
87 | { | ||
88 | "type": "action", | ||
89 | "listener": {"@": "owner"} | ||
90 | } | ||
91 | ] | ||
58 | }, | 92 | }, |
59 | 93 | ||
60 | "owner": { | 94 | "owner": { |
@@ -74,18 +108,16 @@ | |||
74 | </head> | 108 | </head> |
75 | 109 | ||
76 | <body> | 110 | <body> |
77 | <div data-montage-id="rectProperties" class="rectProperties"> | 111 | <div data-montage-id="rectProperties" class="rectProperties toolOptionsFloatChildren"> |
78 | <!--<button id="lockButton" class="unselectable subToolButton button LockToolUp" style=" margin-left:20px"></button>--> | 112 | <button data-montage-id="lockButton" id="lockButton" class="unlock"></button> |
79 | <button data-montage-id="lockButton" id="lockButton" class="unlock" style="margin-left:20px"></button> | ||
80 | <div id="TLRadiusLabel" class="unselectable subToolButton cornerRadius topLeft"></div> | 113 | <div id="TLRadiusLabel" class="unselectable subToolButton cornerRadius topLeft"></div> |
81 | <div data-montage-id="TLRadiusControl" class="label"></div> | 114 | <div data-montage-id="TLRadiusControl" class=""></div> |
82 | <div id="TRRadiusLabel" class="unselectable subToolButton cornerRadius topRight"></div> | 115 | <div id="TRRadiusLabel" class="unselectable subToolButton cornerRadius topRight"></div> |
83 | <div data-montage-id="TRRadiusControl" class="label"></div> | 116 | <div data-montage-id="TRRadiusControl" class=""></div> |
84 | <div id="BLRadiusLabel" class="unselectable subToolButton cornerRadius bottomLeft"></div> | 117 | <div id="BLRadiusLabel" class="unselectable subToolButton cornerRadius bottomLeft"></div> |
85 | <div data-montage-id="BLRadiusControl" class="label"></div> | 118 | <div data-montage-id="BLRadiusControl" class=""></div> |
86 | <div id="BRRadiusLabel" class="unselectable subToolButton cornerRadius bottomRight"></div> | 119 | <div id="BRRadiusLabel" class="unselectable subToolButton cornerRadius bottomRight"></div> |
87 | <div data-montage-id="BRRadiusControl" class="label"></div> | 120 | <div data-montage-id="BRRadiusControl" class=""></div> |
88 | </div> | 121 | </div> |
89 | </body> | 122 | </body> |
90 | |||
91 | </html> \ No newline at end of file | 123 | </html> \ No newline at end of file |
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..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, { | |||
19 | 19 | ||
20 | _subPrepare: { | 20 | _subPrepare: { |
21 | value: function() { | 21 | value: function() { |
22 | this.lockButton.identifier = "lockButton"; | ||
23 | this.lockButton.addEventListener("action", this, false); | ||
24 | |||
25 | this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); | ||
26 | this._setCap([this.TLRadiusControl,this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); | ||
27 | |||
28 | } | 22 | } |
29 | }, | 23 | }, |
30 | 24 | ||
@@ -33,15 +27,20 @@ exports.RectProperties = Montage.create(ToolProperties, { | |||
33 | this.TRRadiusControl.enabled = this.BLRadiusControl.enabled = this.BRRadiusControl.enabled = !this.lockButton.pressed; | 27 | this.TRRadiusControl.enabled = this.BLRadiusControl.enabled = this.BRRadiusControl.enabled = !this.lockButton.pressed; |
34 | 28 | ||
35 | if(this.lockButton.pressed) { | 29 | if(this.lockButton.pressed) { |
36 | this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); | 30 | this._syncRadii(this.TLRadiusControl.value, this.TLRadiusControl.units); |
37 | } else { | ||
38 | this._removeBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); | ||
39 | } | 31 | } |
40 | |||
41 | } | 32 | } |
42 | }, | 33 | }, |
43 | 34 | ||
44 | // Public API | 35 | // Public API |
36 | fill: { | ||
37 | get: function () { return this.base.fill; } | ||
38 | }, | ||
39 | |||
40 | stroke: { | ||
41 | get: function () { return this.base.stroke; } | ||
42 | }, | ||
43 | |||
45 | use3D: { | 44 | use3D: { |
46 | get: function() { return this.base._use3D; } | 45 | get: function() { return this.base._use3D; } |
47 | }, | 46 | }, |
@@ -72,59 +71,51 @@ exports.RectProperties = Montage.create(ToolProperties, { | |||
72 | get: function() { return this.base._fillMaterial.value; } | 71 | get: function() { return this.base._fillMaterial.value; } |