diff options
author | John Mayhew | 2012-05-07 16:30:19 -0700 |
---|---|---|
committer | John Mayhew | 2012-05-07 16:30:19 -0700 |
commit | db4ba95f50148198759dde503ec1c778184d9dbe (patch) | |
tree | 8b79ad58108af2f17d15abc8cdc33d35229ab20d /js/panels/Splitter.js | |
parent | 843d8ea8ee58a54bcb71d7b28dbf78fae153b491 (diff) | |
parent | 526e423e4a2734c2b139af23911e912452a4443f (diff) | |
download | ninja-db4ba95f50148198759dde503ec1c778184d9dbe.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts:
js/components/layout/tools-list.reel/tools-list.html
js/components/layout/tools-properties.reel/tools-properties.html
js/components/tools-properties/brush-properties.reel/brush-properties.html
js/components/tools-properties/fill-properties.reel/fill-properties.html
js/components/tools-properties/pen-properties.reel/pen-properties.html
js/components/tools-properties/pencil-properties.reel/pencil-properties.html
js/components/tools-properties/selection-properties.reel/selection-properties.html
js/components/tools-properties/shape-properties.reel/shape-properties.html
js/components/tools-properties/tag-properties.reel/tag-properties.html
js/components/tools-properties/text-properties.reel/text-properties.html
Diffstat (limited to 'js/panels/Splitter.js')
-rwxr-xr-x | js/panels/Splitter.js | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/js/panels/Splitter.js b/js/panels/Splitter.js index 98ebb36a..0640abb2 100755 --- a/js/panels/Splitter.js +++ b/js/panels/Splitter.js | |||
@@ -55,7 +55,6 @@ exports.Splitter = Montage.create(Component, { | |||
55 | }, | 55 | }, |
56 | set: function(value) { | 56 | set: function(value) { |
57 | this._collapsed = value; | 57 | this._collapsed = value; |
58 | |||
59 | this.application.localStorage.setItem(this.element.getAttribute("data-montage-id"), {"version": this.version, "value": value}); | 58 | this.application.localStorage.setItem(this.element.getAttribute("data-montage-id"), {"version": this.version, "value": value}); |
60 | } | 59 | } |
61 | }, | 60 | }, |
@@ -139,5 +138,39 @@ exports.Splitter = Montage.create(Component, { | |||
139 | value: function() { | 138 | value: function() { |
140 | this.handleClick(); | 139 | this.handleClick(); |
141 | } | 140 | } |
141 | }, | ||
142 | |||
143 | collapse:{ | ||
144 | value: function() { | ||
145 | if (this.collapsed === false) { | ||
146 | if(this.panel.element) { | ||
147 | this.panel.element.addEventListener("webkitTransitionEnd", this, false); | ||
148 | } else { | ||
149 | this.panel.addEventListener("webkitTransitionEnd", this, false); | ||
150 | } | ||
151 | this._collapsed = true; | ||
152 | this.needsDraw = true; | ||
153 | } | ||
154 | } | ||
155 | }, | ||
156 | restore:{ | ||
157 | value: function() { | ||
158 | //Get splitter initial value from SettingManager | ||
159 | var storedData = this.application.localStorage.getItem(this.element.getAttribute("data-montage-id")), temp = this.collapsed; | ||
160 | if(storedData && this.element.getAttribute("data-montage-id") !== null) { | ||
161 | this._collapsed = storedData.value; | ||
162 | |||
163 | } else { | ||
164 | this._collapsed = false; | ||
165 | } | ||
166 | if(temp != this._collapsed){ | ||
167 | if(this.panel.element) { | ||
168 | this.panel.element.addEventListener("webkitTransitionEnd", this, false); | ||
169 | } else { | ||
170 | this.panel.addEventListener("webkitTransitionEnd", this, false); | ||
171 | } | ||
172 | this.needsDraw = true; | ||
173 | } | ||
174 | } | ||
142 | } | 175 | } |
143 | }); | 176 | }); |