aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-27 09:32:53 -0700
committerNivesh Rajbhandari2012-03-27 09:32:53 -0700
commit406bbfc63f8ed42d7da105dbd068a49ff8fb5f09 (patch)
tree3a8b45f4802f002269ff1bcf596f94cee4679a07 /js/panels/properties.reel
parentbda9f8f5829c943486f8850e68c991e83f8fb8c8 (diff)
parent309dde5a8c4599cef6a1052c1ff9ee1ad8ec5858 (diff)
downloadninja-406bbfc63f8ed42d7da105dbd068a49ff8fb5f09.tar.gz
Merge branch 'refs/heads/ninja-internal' into WebGLMaterials
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-xjs/panels/properties.reel/properties.css13
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js13
-rwxr-xr-xjs/panels/properties.reel/sections/position-and-size.reel/position-and-size.css32
-rwxr-xr-xjs/panels/properties.reel/sections/position-and-size.reel/position-and-size.html13
-rwxr-xr-xjs/panels/properties.reel/sections/position-and-size.reel/position-and-size.js10
5 files changed, 53 insertions, 28 deletions
diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css
index f8d37984..f82d3660 100755
--- a/js/panels/properties.reel/properties.css
+++ b/js/panels/properties.reel/properties.css
@@ -230,23 +230,10 @@ padding-right:6px;
230 clear:none; 230 clear:none;
231} 231}
232 232
233.propertiesPanel .LockToolUp, .propertiesPanel .UnLockToolUp {
234 position: absolute;
235 left: 105px;
236 border: none;
237 background-color: transparent;
238 top: 2px;
239 opacity: 0.7;
240}
241
242.propertiesPanel .button:active { 233.propertiesPanel .button:active {
243 outline: none; 234 outline: none;
244} 235}
245 236
246.propertiesPanel .LockToolUp:hover, .propertiesPanel .UnLockToolUp:hover {
247 opacity: 1;
248}
249
250.propertiesPanel input[type="checkbox"].nj-skinned, .propertiesPanel input[type="radio"].nj-skinned { 237.propertiesPanel input[type="checkbox"].nj-skinned, .propertiesPanel input[type="radio"].nj-skinned {
251 position: relative; 238 position: relative;
252 overflow: visible; 239 overflow: visible;
diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js
index 703ef950..ac316907 100755
--- a/js/panels/properties.reel/sections/custom.reel/custom.js
+++ b/js/panels/properties.reel/sections/custom.reel/custom.js
@@ -328,6 +328,19 @@ exports.CustomSection = Montage.create(Component, {
328 if (aField.value) obj.label = aField.value; 328 if (aField.value) obj.label = aField.value;
329 if (aField.prop) obj.prop = aField.prop; 329 if (aField.prop) obj.prop = aField.prop;
330 330
331 if (aField.enabled) {
332 if(aField.enabled.boundObject) {
333 // TODO - For now, always bind to this.controls[someProperty]
334 Object.defineBinding(obj, "enabled", {
335 boundObject: this.controls,
336 boundObjectPropertyPath: aField.enabled.boundProperty,
337 oneway: false
338 });
339 } else {
340 obj.enabled = aField.enabled;
341 }
342 }
343
331 //Initiate onChange Events 344 //Initiate onChange Events
332 obj.addEventListener("change", this, false); 345 obj.addEventListener("change", this, false);
333 346
diff --git a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css
index 227a232b..7f8fdbc2 100755
--- a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css
+++ b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css
@@ -8,7 +8,33 @@
8 display: none; 8 display: none;
9} 9}
10 10
11.fieldCol .disabled 11.fieldCol .disabled {
12{
13 color:#999999; 12 color:#999999;
14} \ No newline at end of file 13}
14
15
16#posBound {
17 position: absolute;
18 left: 105px;
19 border: none;
20 background-color: transparent;
21 top: 2px;
22 opacity: 0.7;
23 width: 17px;
24 height: 18px;
25 margin-right: 10px;
26}
27
28#posBound:hover {
29 opacity: 1;
30}
31
32.unlock{
33 background: url("../../../../../images/optionsbar/unlinked.png") no-repeat;
34
35}
36
37.lockUp {
38 background: url("../../../../../images/optionsbar/link.png") no-repeat;
39}
40
diff --git a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html
index 6e355f31..f50724c5 100755
--- a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html
+++ b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html
@@ -85,13 +85,12 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
85 } 85 }
86 }, 86 },
87 "bindButton": { 87 "bindButton": {
88 "module": "js/components/button.reel", 88 "prototype": "montage/ui/toggle-button.reel",
89 "name": "Button",
90 "properties": { 89 "properties": {
91 "element": {"#" :"posBound"}, 90 "element": {"#": "posBound"},
92 "isToggleButton": true, 91 "pressedClass": "lockUp",
93 "onState": "LockToolUp", 92 "preventFocus": true,
94 "offState": "UnLockToolUp" 93 "identifier": "ratio"
95 } 94 }
96 } 95 }
97 } 96 }
@@ -119,7 +118,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
119 </section> 118 </section>
120 <hr /> 119 <hr />
121 <section class="fieldCol"> 120 <section class="fieldCol">
122 <button id="posBound"></button> 121 <button id="posBound" class="unlock"></button>
123 <label>Width:</label> 122 <label>Width:</label>
124 <article class="fieldRow twoCol"> 123 <article class="fieldRow twoCol">
125 <div> 124 <div>
diff --git a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js
index 49117090..1e47916f 100755
--- a/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js
+++ b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js
@@ -100,7 +100,7 @@ exports.PosSize = Montage.create(Component, {
100 */ 100 */
101 handleRatioAction: { 101 handleRatioAction: {
102 value: function() { 102 value: function() {
103 if(this.bindButton.value) { 103 if(this.bindButton.pressed) {
104 this.aspectRatioWidth = this.heightControl.value / this.widthControl.value; 104 this.aspectRatioWidth = this.heightControl.value / this.widthControl.value;
105 if(isNaN(this.aspectRatioWidth) || !isFinite(this.aspectRatioWidth) || this.aspectRatioWidth === 0) this.aspectRatioWidth = 1; 105 if(isNaN(this.aspectRatioWidth) || !isFinite(this.aspectRatioWidth) || this.aspectRatioWidth === 0) this.aspectRatioWidth = 1;
106 106
@@ -148,7 +148,7 @@ exports.PosSize = Montage.create(Component, {
148 148
149 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot]; 149 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot];
150 150
151 if(this.bindButton.value) { 151 if(this.bindButton.pressed) {
152 152
153 var newWidth = Math.round(this.aspectRatioHeight * this.heightControl.value); 153 var newWidth = Math.round(this.aspectRatioHeight * this.heightControl.value);
154 154
@@ -173,7 +173,7 @@ exports.PosSize = Montage.create(Component, {
173 173
174 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot]; 174 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot];
175 175
176 if(this.bindButton.value) { 176 if(this.bindButton.pressed) {
177 177
178 var newHeight = Math.round(this.aspectRatioWidth * this.widthControl.value); 178 var newHeight = Math.round(this.aspectRatioWidth * this.widthControl.value);
179 179
@@ -221,7 +221,7 @@ exports.PosSize = Montage.create(Component, {
221 221
222 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot]; 222 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot];
223 223
224 if(this.bindButton.value) { 224 if(this.bindButton.pressed) {
225 225
226 var newWidth = Math.round(this.aspectRatioHeight * this.heightControl.value); 226 var newWidth = Math.round(this.aspectRatioHeight * this.heightControl.value);
227 227
@@ -246,7 +246,7 @@ exports.PosSize = Montage.create(Component, {
246 246
247 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot]; 247 this.application.ninja.selectedElements.length ? items = this.application.ninja.selectedElements : items = [this.application.ninja.currentDocument.documentRoot];
248 248
249 if(this.bindButton.value) { 249 if(this.bindButton.pressed) {
250 var newHeight = Math.round(this.aspectRatioWidth * this.widthControl.value); 250 var newHeight = Math.round(this.aspectRatioWidth * this.widthControl.value);
251