diff options
author | hwc487 | 2012-07-09 16:08:02 -0700 |
---|---|---|
committer | hwc487 | 2012-07-09 16:08:02 -0700 |
commit | 5085d0f67df89a21715308956004164597a6ba79 (patch) | |
tree | 2c896163143a66331205a39b0a3b1b45d51bf12a /js/panels/Resizer.js | |
parent | 51f1691f792dbda9b740ded8aa0457c9406db156 (diff) | |
parent | 84b3327bd92faafab7954b5eb64c7abe24a3fe13 (diff) | |
download | ninja-5085d0f67df89a21715308956004164597a6ba79.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into GridFixes
Conflicts:
js/helper-classes/3D/StageLine.js
Diffstat (limited to 'js/panels/Resizer.js')
-rwxr-xr-x | js/panels/Resizer.js | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/js/panels/Resizer.js b/js/panels/Resizer.js index 6bfcb9e7..ebef1933 100755 --- a/js/panels/Resizer.js +++ b/js/panels/Resizer.js | |||
@@ -71,7 +71,7 @@ exports.Resizer = Montage.create(Component, { | |||
71 | _isInversed: { | 71 | _isInversed: { |
72 | value: false | 72 | value: false |
73 | }, | 73 | }, |
74 | 74 | ||
75 | isInversed: { | 75 | isInversed: { |
76 | get: function() { | 76 | get: function() { |
77 | return this._isInversed; | 77 | return this._isInversed; |
@@ -81,11 +81,11 @@ exports.Resizer = Montage.create(Component, { | |||
81 | }, | 81 | }, |
82 | serializable: true | 82 | serializable: true |
83 | }, | 83 | }, |
84 | 84 | ||
85 | _isVertical: { | 85 | _isVertical: { |
86 | value: null | 86 | value: null |
87 | }, | 87 | }, |
88 | 88 | ||
89 | isVertical: { | 89 | isVertical: { |
90 | get: function() { | 90 | get: function() { |
91 | return this._isVertical; | 91 | return this._isVertical; |
@@ -97,22 +97,22 @@ exports.Resizer = Montage.create(Component, { | |||
97 | }, | 97 | }, |
98 | 98 | ||
99 | _isPanel: { | 99 | _isPanel: { |
100 | value: true | 100 | value: true |
101 | }, | 101 | }, |
102 | isPanel: { | 102 | isPanel: { |
103 | get: function() { | 103 | get: function() { |
104 | return this._isPanel; | 104 | return this._isPanel; |
105 | }, | 105 | }, |
106 | set: function(value) { | 106 | set: function(value) { |
107 | this._isPanel = value; | 107 | this._isPanel = value; |
108 | }, | 108 | }, |
109 | serializable: true | 109 | serializable: true |
110 | }, | 110 | }, |
111 | 111 | ||
112 | _panel : { | 112 | _panel : { |
113 | value: null | 113 | value: null |
114 | }, | 114 | }, |
115 | 115 | ||
116 | panel : { | 116 | panel : { |
117 | get: function() { | 117 | get: function() { |
118 | return this._panel; | 118 | return this._panel; |
@@ -127,10 +127,10 @@ exports.Resizer = Montage.create(Component, { | |||
127 | height: { | 127 | height: { |
128 | value: null | 128 | value: null |
129 | }, | 129 | }, |
130 | 130 | ||
131 | handleClick: { | 131 | handleClick: { |
132 | value: function() { | 132 | value: function() { |
133 | 133 | ||
134 | } | 134 | } |
135 | }, | 135 | }, |
136 | 136 | ||
@@ -147,14 +147,14 @@ exports.Resizer = Montage.create(Component, { | |||
147 | this._startPosition = e.x; | 147 | this._startPosition = e.x; |
148 | this._initDimension = this.panel.offsetWidth; | 148 | this._initDimension = this.panel.offsetWidth; |
149 | } | 149 | } |
150 | 150 | ||
151 | this.panel.classList.add("disableTransition"); | 151 | this.panel.classList.add("disableTransition"); |
152 | window.addEventListener("mousemove", this, false); | 152 | window.addEventListener("mousemove", this, false); |
153 | window.addEventListener("mouseup", this, false); | 153 | window.addEventListener("mouseup", this, false); |
154 | NJevent("panelResizedStart", this) | 154 | NJevent("panelResizedStart", this) |
155 | } | 155 | } |
156 | }, | 156 | }, |
157 | 157 | ||
158 | handleDblclick: { | 158 | handleDblclick: { |
159 | value : function() { | 159 | value : function() { |
160 | this.panel.addEventListener("webkitTransitionEnd", this, false); | 160 | this.panel.addEventListener("webkitTransitionEnd", this, false); |
@@ -179,7 +179,7 @@ exports.Resizer = Montage.create(Component, { | |||
179 | 179 | ||
180 | } | 180 | } |
181 | }, | 181 | }, |
182 | 182 | ||
183 | prepareForDraw: { | 183 | prepareForDraw: { |
184 | value: function() { | 184 | value: function() { |
185 | if(this.willSave) { | 185 | if(this.willSave) { |
@@ -202,13 +202,13 @@ exports.Resizer = Montage.create(Component, { | |||
202 | this.element.addEventListener("dblclick", this, false); | 202 | this.element.addEventListener("dblclick", this, false); |
203 | } | 203 | } |
204 | }, | 204 | }, |
205 | 205 | ||
206 | draw: { | 206 | draw: { |
207 | value: function() { | 207 | value: function() { |
208 | 208 | ||
209 | } | 209 | } |
210 | }, | 210 | }, |
211 | 211 | ||
212 | handleMouseup: { | 212 | handleMouseup: { |
213 | value: function(e) { | 213 | value: function(e) { |
214 | e.preventDefault(); | 214 | e.preventDefault(); |
@@ -231,7 +231,7 @@ exports.Resizer = Montage.create(Component, { | |||
231 | NJevent("panelResizedEnd", this) | 231 | NJevent("panelResizedEnd", this) |
232 | } | 232 | } |
233 | }, | 233 | }, |
234 | 234 | ||
235 | handleMousemove: { | 235 | handleMousemove: { |
236 | value: function(e) { | 236 | value: function(e) { |
237 | if(this.isVertical) { | 237 | if(this.isVertical) { |
@@ -239,18 +239,18 @@ exports.Resizer = Montage.create(Component, { | |||
239 | this.panel.style.height = this.value + "px"; | 239 | this.panel.style.height = this.value + "px"; |
240 | } | 240 | } |
241 | else { | 241 | else { |
242 | if (this.isPanel) { | 242 | if (this.isPanel) { |
243 | this.value = this._initDimension + (this._startPosition - e.x); | 243 | this.value = this._initDimension + (this._startPosition - e.x); |
244 | } else { | 244 | } else { |
245 | this.value = this._isInversed ? this._initDimension + (this._startPosition - e.x) : this._initDimension + (e.x - this._startPosition); | 245 | this.value = this._isInversed ? this._initDimension + (this._startPosition - e.x) : this._initDimension + (e.x - this._startPosition); |
246 | } | 246 | } |
247 | this.panel.style.width = this.value + "px"; | 247 | this.panel.style.width = this.value + "px"; |
248 | } | 248 | } |
249 | 249 | ||
250 | if(this.redrawStage) { | 250 | if(this.redrawStage) { |
251 | this.application.ninja.stage.resizeCanvases = true; | 251 | this.application.ninja.stage.resizeCanvases = true; |
252 | } | 252 | } |
253 | 253 | ||
254 | NJevent("panelResizing", this); | 254 | NJevent("panelResizing", this); |
255 | } | 255 | } |
256 | } | 256 | } |