aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties
diff options
context:
space:
mode:
authorhwc4872012-03-24 14:07:58 -0700
committerhwc4872012-03-24 14:07:58 -0700
commitcca20db1f346fc9bf2ead64c83e479f5f5ebf2d2 (patch)
tree4f5c42f0a1df00dcd1a2064dd176fcff7930ba47 /js/components/tools-properties
parent62f4327f9b83760e52a1f6bf1e689b1e0a780fbb (diff)
parent7ee75fef18c21275cf29740a6fdd81ea90e41f45 (diff)
downloadninja-cca20db1f346fc9bf2ead64c83e479f5f5ebf2d2.tar.gz
Merge branch 'montage-integration' of github.com:Motorola-Mobility/ninja-internal into Textures
Diffstat (limited to 'js/components/tools-properties')
-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.js20
-rwxr-xr-xjs/components/tools-properties/text-properties.reel/text-properties.html2
4 files changed, 32 insertions, 25 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..f023f4bb 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]);
40 } else {
41 this.lockButton.classList.remove("UnLockToolUp");
42 this.lockButton.classList.add("LockToolUp");
43 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]); 36 this._setBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
37 } else {
38 this._removeBindings([this.TRRadiusControl, this.BLRadiusControl, this.BRRadiusControl]);
44 } 39 }
40
45 } 41 }
46 }, 42 },
47 43
diff --git a/js/components/tools-properties/text-properties.reel/text-properties.html b/js/components/tools-properties/text-properties.reel/text-properties.html
index 13a88ba7..2d50a79e 100755
--- a/js/components/tools-properties/text-properties.reel/text-properties.html
+++ b/js/components/tools-properties/text-properties.reel/text-properties.html
@@ -69,7 +69,7 @@
69 69
70 }, 70 },
71 "fontSettings": { 71 "fontSettings": {
72 "module": "js/components/button.reel", 72 "module": "montage/ui/button.reel",
73 "name": "Button", 73 "name": "Button",
74 "properties": { 74 "properties": {
75 "element": {"#": "fontSettings"} 75 "element": {"#": "fontSettings"}