aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/sections/position-and-size.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties.reel/sections/position-and-size.reel')
-rwxr-xr-xjs/panels/properties.reel/sections/position-and-size.reel/position-and-size.css14
-rwxr-xr-xjs/panels/properties.reel/sections/position-and-size.reel/position-and-size.html142
-rwxr-xr-xjs/panels/properties.reel/sections/position-and-size.reel/position-and-size.js264
3 files changed, 420 insertions, 0 deletions
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
new file mode 100755
index 00000000..227a232b
--- /dev/null
+++ b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.css
@@ -0,0 +1,14 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7.fieldCol .hide {
8 display: none;
9}
10
11.fieldCol .disabled
12{
13 color:#999999;
14} \ No newline at end of file
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
new file mode 100755
index 00000000..6e355f31
--- /dev/null
+++ b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.html
@@ -0,0 +1,142 @@
1<!DOCTYPE html>
2<!-- <copyright>
3This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6</copyright> -->
7<html lang="en">
8<head>
9 <link rel="stylesheet" href="position-and-size.css" type="text/css">
10 <script type="text/montage-serialization">
11 {
12 "owner": {
13 "module" : "js/panels/properties.reel/sections/position-and-size.reel",
14 "name" : "PosSize",
15 "properties" : {
16 "element" : {"#": "section"},
17 "position": {"#": "position"},
18 "leftLabel": {"#": "labelX"},
19 "leftControl": {"@": "PosX"},
20 "topLabel": {"#": "labelY"},
21 "topControl": {"@": "PosY"},
22 "heightControl": {"@": "PosH"},
23 "widthControl": {"@": "PosW"},
24 "bindButton": {"@": "bindButton"}
25 }
26 },
27 "PosX": {
28 "module": "js/components/hottextunit.reel",
29 "name": "HotTextUnit",
30 "properties": {
31 "element": {"#": "PosX"},
32 "maxValue": 10000,
33 "minValue": -10000
34 },
35 "bindings": {
36 "value": {
37 "boundObject": {"@": "owner"},
38 "boundObjectPropertyPath": "leftPosition",
39 "oneway": false
40 }
41 }
42 },
43 "PosY": {
44 "module": "js/components/hottextunit.reel",
45 "name": "HotTextUnit",
46 "properties": {
47 "element": {"#": "PosY"},
48 "maxValue": 10000,
49 "minValue": -10000
50 },
51 "bindings": {
52 "value": {
53 "boundObject": {"@": "owner"},
54 "boundObjectPropertyPath": "topPosition",
55 "oneway": false
56 }
57 }
58 },
59 "PosH": {
60 "module": "js/components/hottextunit.reel",
61 "name": "HotTextUnit",
62 "properties": {
63 "element": {"#": "PosH"}
64 },
65 "bindings": {
66 "value": {
67 "boundObject": {"@": "owner"},
68 "boundObjectPropertyPath": "heightSize",
69 "oneway": false
70 }
71 }
72 },
73 "PosW": {
74 "module": "js/components/hottextunit.reel",
75 "name": "HotTextUnit",
76 "properties": {
77 "element": {"#": "PosW"}
78 },
79 "bindings": {
80 "value": {
81 "boundObject": {"@": "owner"},
82 "boundObjectPropertyPath": "widthSize",
83 "oneway": false
84 }
85 }
86 },
87 "bindButton": {
88 "module": "js/components/button.reel",
89 "name": "Button",
90 "properties": {
91 "element": {"#" :"posBound"},
92 "isToggleButton": true,
93 "onState": "LockToolUp",
94 "offState": "UnLockToolUp"
95 }
96 }
97 }
98 </script>
99</head>
100<body>
101 <div id="section" class="sectional">
102 <section id="position" class="fieldCol">
103 <label id="labelX">Left:</label>
104 <article class="fieldRow twoCol">
105 <div>
106 <div class="inputField">
107 <div id="PosX"></div>
108 </div>
109 </div>
110 <div>
111 <div>
112 <label id="labelY">Top:</label>
113 </div>
114 <div class="inputField">
115 <div id="PosY"></div>
116 </div>
117 </div>
118 </article>
119 </section>
120 <hr />
121 <section class="fieldCol">
122 <button id="posBound"></button>
123 <label>Width:</label>
124 <article class="fieldRow twoCol">
125 <div>
126 <div class="inputField">
127 <div id="PosW"></div>
128 </div>
129 </div>
130 <div>
131 <div>
132 <label>Height:</label>
133 </div>
134 <div class="inputField">
135 <div id="PosH"></div>
136 </div>
137 </div>
138 </article>
139 </section>
140 </div>
141</body>
142</html> \ No newline at end of file
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
new file mode 100755
index 00000000..49117090
--- /dev/null
+++ b/js/panels/properties.reel/sections/position-and-size.reel/position-and-size.js
@@ -0,0 +1,264 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9
10exports.PosSize = Montage.create(Component, {
11 leftPosition: {
12 value: 0
13 },
14
15 topPosition: {
16 value: 0
17 },
18
19 heightSize: {
20 value: 0
21 },
22
23 widthSize: {
24 value: 0
25 },
26
27 savedPosition: {
28 value: null
29 },
30
31 aspectRatioWidth: {
32 value: null
33 },
34
35 aspectRatioHeight: {
36