diff options
Diffstat (limited to 'js/ninja.reel')
-rwxr-xr-x | js/ninja.reel/ninja.js | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/js/ninja.reel/ninja.js b/js/ninja.reel/ninja.js index c3e00911..068a44bc 100755 --- a/js/ninja.reel/ninja.js +++ b/js/ninja.reel/ninja.js | |||
@@ -35,11 +35,19 @@ exports.Ninja = Montage.create(Component, { | |||
35 | 35 | ||
36 | height: { | 36 | height: { |
37 | get: function() { | 37 | get: function() { |
38 | if(this._height === null) { | ||
39 | var storedData = this.application.localStorage.getItem("timelinePanel"); | ||
40 | if(storedData && storedData.value) { | ||
41 | this._height = storedData.value; | ||
42 | } | ||
43 | } | ||
38 | return this._height; | 44 | return this._height; |
39 | }, | 45 | }, |
40 | set: function(val) { | 46 | set: function(val) { |
41 | if(this._height != val) { | 47 | if(this._height != val) { |
42 | this._height = val; | 48 | this._height = val; |
49 | this.application.localStorage.setItem("timelinePanel", {"version": this.version, "value": val}); | ||
50 | this.needsDraw = true; | ||
43 | } | 51 | } |
44 | 52 | ||
45 | } | 53 | } |
@@ -54,11 +62,19 @@ exports.Ninja = Montage.create(Component, { | |||
54 | 62 | ||
55 | width: { | 63 | width: { |
56 | get: function() { | 64 | get: function() { |
65 | if(this._width === null) { | ||
66 | var storedData = this.application.localStorage.getItem("rightPanelsContainer"); | ||
67 | if(storedData && storedData.value) { | ||
68 | this._width = storedData.value; | ||
69 | } | ||
70 | } | ||
57 | return this._width; | 71 | return this._width; |
58 | }, | 72 | }, |
59 | set: function(val) { | 73 | set: function(val) { |
60 | if(this._width != val) { | 74 | if(this._width != val) { |
61 | this._width = val; | 75 | this._width = val; |
76 | this.application.localStorage.setItem("rightPanelsContainer", {"version": this.version, "value": val}); | ||
77 | this.needsDraw = true; | ||
62 | } | 78 | } |
63 | 79 | ||
64 | } | 80 | } |
@@ -106,10 +122,10 @@ exports.Ninja = Montage.create(Component, { | |||
106 | this.height = 140; | 122 | this.height = 140; |
107 | this._resizedHeight = 0; | 123 | this._resizedHeight = 0; |
108 | this._resizedWidth = 0; | 124 | this._resizedWidth = 0; |
109 | this.needsDraw = true; | ||
110 | this.timelineSplitter.collapsed = false; | 125 | this.timelineSplitter.collapsed = false; |
111 | this.panelSplitter.collapsed = false; | 126 | this.panelSplitter.collapsed = false; |
112 | this.stage.resizeCanvases = true; | 127 | this.stage.resizeCanvases = true; |
128 | this.needsDraw = true; | ||
113 | } | 129 | } |
114 | }, | 130 | }, |
115 | 131 | ||
@@ -183,16 +199,16 @@ exports.Ninja = Montage.create(Component, { | |||
183 | } else { | 199 | } else { |
184 | this.timelineSplitter.collapsed = false; | 200 | this.timelineSplitter.collapsed = false; |
185 | } | 201 | } |
186 | this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; | ||
187 | 202 | ||
188 | if (this.width - this._resizedWidth < 30) { | 203 | if (this.width - this._resizedWidth < 30) { |
189 | this.panelSplitter.collapsed = true; | 204 | this.panelSplitter.collapsed = true; |
190 | } else { | 205 | } else { |
191 | this.panelSplitter.collapsed = false; | 206 | this.panelSplitter.collapsed = false; |
192 | } | 207 | } |
193 | this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; | ||
194 | } | ||
195 | 208 | ||
209 | } | ||
210 | this.rightPanelContainer.style.width = (this.width - this._resizedWidth) + "px"; | ||
211 | this.timeline.element.style.height = (this.height - this._resizedHeight) + "px"; | ||
196 | } | 212 | } |
197 | }, | 213 | }, |
198 | 214 | ||