aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.css19
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.html16
-rwxr-xr-xjs/components/tools-properties/rect-properties.reel/rect-properties.js16
3 files changed, 29 insertions, 22 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 74509555..cbd9dde8 100755
--- a/js/components/tools-properties/rect-properties.reel/rect-properties.css
+++ b/js/components/tools-properties/rect-properties.reel/rect-properties.css
@@ -4,16 +4,15 @@
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6 6
7.rectProperties .button { 7#lockButton {
8 border:none; 8 float:left;
9 cursor:default; 9 border: none;
10 text-align:center; 10 background-color: transparent;
11 -webkit-user-select:none; 11 top: 2px;
12 opacity:0.8; 12 opacity: 0.7;
13 display:table-cell; 13 width: 17px;
14 vertical-align:middle; 14 height: 18px;
15 background-color:#333333; 15 margin-right: 10px;
16 color:white;
17} 16}
18 17
19.rectProperties .subToolButton { 18.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 214ff1d5..ceb761b9 100755
--- a/js/components/tools-properties/rect-properties.reel/rect-properties.html
+++ b/js/components/tools-properties/rect-properties.reel/rect-properties.html
@@ -50,12 +50,23 @@
50 } 50 }
51 }, 51 },
52 52
53 "lockButton": {
54 "prototype": "montage/ui/toggle-button.reel",
55 "properties": {
56 "element": {"#": "lockButton"},
57 "pressed": true,
58 "pressedClass": "lockUp",
59 "preventFocus": true,
60 "identifier": "ratio"
61 }
62 },
63
53 "owner": { 64 "owner": {
54 "module": "js/components/tools-properties/rect-properties.reel", 65 "module": "js/components/tools-properties/rect-properties.reel",
55 "name": "RectProperties", 66 "name": "RectProperties",
56 "properties": { 67 "properties": {
57 "element": {"#": "rectProperties"}, 68 "element": {"#": "rectProperties"},
58 "lockButton": {"#": "lockButton"}, 69 "lockButton": {"@": "lockButton"},
59 "TLRadiusControl": {"@": "hottext1"}, 70 "TLRadiusControl": {"@": "hottext1"},
60 "TRRadiusControl": {"@": "hottext2"}, 71 "TRRadiusControl": {"@": "hottext2"},
61 "BLRadiusControl": {"@": "hottext3"}, 72 "BLRadiusControl": {"@": "hottext3"},
@@ -69,7 +80,8 @@
69 80
70 <body> 81 <body>
71 <div id="rectProperties" class="rectProperties"> 82 <div id="rectProperties" class="rectProperties">
72 <button id="lockButton" class="unselectable subToolButton button LockToolUp" style=" margin-left:20px"></button> 83 <!--<button id="lockButton" class="unselectable subToolButton button LockToolUp" style=" margin-left:20px"></button>-->
84 <button id="lockButton" class="unlock" style="margin-left:20px"></button>
73 <div id="TLRadiusLabel" class="unselectable subToolButton cornerRadius topLeft"></div> 85 <div id="TLRadiusLabel" class="unselectable subToolButton cornerRadius topLeft"></div>
74 <div id="TLRadiusControl" class="label"></div> 86 <div id="TLRadiusControl" class="label"></div>
75 <div id="TRRadiusLabel" class="unselectable subToolButton cornerRadius topRight"></div> 87 <div id="TRRadiusLabel" class="unselectable subToolButton cornerRadius topRight"></div>
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 b2de6ff7..b4085eea 100755
--- a/js/components/tools-properties/rect-properties.reel/rect-properties.js
+++ b/js/components/tools-properties/rect-properties.reel/rect-properties.js
@@ -19,7 +19,8 @@ exports.RectProperties = Montage.create(ToolProperties, {
19 19
20 _subPrepare: { 20 _subPrepare: {
21 value: function() { 21 value: function() {
22 this.lockButton.addEventListener("click", this, false); 22 this.lockButton.identifier = "lockButton";
23 this.lockButton.addEventListener("action", this, false);
23 24
24 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); 25 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
25 this._setCap([this.TLRadiusControl,this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); 26 this._setCap([this.TLRadiusControl,this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
@@ -27,21 +28,16 @@ exports.RectProperties = Montage.create(ToolProperties, {
27 } 28 }
28 }, 29 },
29 30
30 handleClick: { 31 handleLockButtonAction: {
31 value: function(event) { 32 value: function(event) {
32 this._unlocked = !this._unlocked; 33 this.TRRadiusControl.enabled = this.BLRadiusControl.enabled = this.BRRadiusControl.enabled = !this.lockButton.pressed;
33 34
34 this.TRRadiusControl.enabled = this.BLRadiusControl.enabled = this.BRRadiusControl.enabled = this._unlocked; 35 if(this.lockButton.pressed) {
35
36 if(this._unlocked) {
37 this.lockButton.classList.remove("LockToolUp");
38 this.lockButton.classList.add("UnLockToolUp");
39 this._removeBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); 36 this._removeBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
40 } else { 37 } else {
41 this.lockButton.classList.remove("UnLockToolUp");
42 this.lockButton.classList.add("LockToolUp");
43 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); 38 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
44 } 39 }
40
45 } 41 }
46 }, 42 },
47 43