diff options
author | Jon Reid | 2012-03-09 16:41:02 -0800 |
---|---|---|
committer | Jon Reid | 2012-03-09 16:41:02 -0800 |
commit | 54b31ecbd4c9877183850542227c61946a62aa4f (patch) | |
tree | e93862d42968f5885fff4f84473c6da6cff97236 /js/panels | |
parent | ebe6a42bdf76d53a985dec528ad9702df3738f56 (diff) | |
download | ninja-54b31ecbd4c9877183850542227c61946a62aa4f.tar.gz |
Timeline: new enablePanel() method on TimelinePanel class.
Diffstat (limited to 'js/panels')
3 files changed, 31 insertions, 3 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index cf9bace6..14c5f1c8 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | |||
@@ -33,7 +33,8 @@ | |||
33 | "timebar" : {"#": "time_bar"}, | 33 | "timebar" : {"#": "time_bar"}, |
34 | "container_tracks" : {"#" : "container-tracks"}, | 34 | "container_tracks" : {"#" : "container-tracks"}, |
35 | "end_hottext" : {"@" : "endHottext"}, | 35 | "end_hottext" : {"@" : "endHottext"}, |
36 | "container_layers" : {"#" : "container-layers"} | 36 | "container_layers" : {"#" : "container-layers"}, |
37 | "timeline_disabler" : {"#" : "timeline-disabler"} | ||
37 | } | 38 | } |
38 | }, | 39 | }, |
39 | 40 | ||
@@ -189,6 +190,8 @@ | |||
189 | </div> | 190 | </div> |
190 | </div> | 191 | </div> |
191 | </div> | 192 | </div> |
193 | |||
194 | <div class="timeline-disabled" id="timeline-disabler"></div> | ||
192 | 195 | ||
193 | </div> | 196 | </div> |
194 | </div> | 197 | </div> |
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 8ae801fc..e1f0a21c 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -335,6 +335,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
335 | this.playhead.addEventListener("mousedown", this.startPlayheadTracking.bind(this), false); | 335 | this.playhead.addEventListener("mousedown", this.startPlayheadTracking.bind(this), false); |
336 | this.playhead.addEventListener("mouseup", this.stopPlayheadTracking.bind(this), false); | 336 | this.playhead.addEventListener("mouseup", this.stopPlayheadTracking.bind(this), false); |
337 | this.time_markers.addEventListener("click", this.updatePlayhead.bind(this), false); | 337 | this.time_markers.addEventListener("click", this.updatePlayhead.bind(this), false); |
338 | this.enablePanel(false); | ||
338 | } | 339 | } |
339 | }, | 340 | }, |
340 | 341 | ||
@@ -437,7 +438,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
437 | this.deselectTweens(); | 438 | this.deselectTweens(); |
438 | 439 | ||
439 | // Reset visual appearance | 440 | // Reset visual appearance |
440 | // Todo: Maybe this should be stored per document? | 441 | // Todo: Maybe this should be stored per document, so we can persist between document switch? |
441 | this.application.ninja.timeline.playhead.style.left = "-2px"; | 442 | this.application.ninja.timeline.playhead.style.left = "-2px"; |
442 | this.application.ninja.timeline.playheadmarker.style.left = "0px"; | 443 | this.application.ninja.timeline.playheadmarker.style.left = "0px"; |
443 | this.application.ninja.timeline.updateTimeText(0.00); | 444 | this.application.ninja.timeline.updateTimeText(0.00); |
@@ -475,7 +476,10 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
475 | 476 | ||
476 | // Reinitialize the timeline...but only if there are open documents. | 477 | // Reinitialize the timeline...but only if there are open documents. |
477 | if (this.application.ninja.documentController._documents.length > 0) { | 478 | if (this.application.ninja.documentController._documents.length > 0) { |
479 | this.enablePanel(true); | ||
478 | this.initTimelineForDocument(); | 480 | this.initTimelineForDocument(); |
481 | } else { | ||
482 | this.enablePanel(false); | ||
479 | } | 483 | } |
480 | } | 484 | } |
481 | }, | 485 | }, |
@@ -1159,6 +1163,15 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1159 | return command; | 1163 | return command; |
1160 | } | 1164 | } |
1161 | }, | 1165 | }, |
1166 | enablePanel : { | ||
1167 | value: function(boolEnable) { | ||
1168 | if (boolEnable) { | ||
1169 | this.timeline_disabler.style.display = "none"; | ||
1170 | } else { | ||
1171 | this.timeline_disabler.style.display = "block"; | ||
1172 | } | ||
1173 | } | ||
1174 | }, | ||
1162 | /* === END: Controllers === */ | 1175 | /* === END: Controllers === */ |
1163 | 1176 | ||
1164 | /* === BEGIN: Logging routines === */ | 1177 | /* === BEGIN: Logging routines === */ |
diff --git a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css index c122b18f..129b9771 100644 --- a/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css +++ b/js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css | |||
@@ -15,6 +15,7 @@ | |||
15 | display: -webkit-box; | 15 | display: -webkit-box; |
16 | -webkit-box-orient: horizontal | 16 | -webkit-box-orient: horizontal |
17 | height : 100%; | 17 | height : 100%; |
18 | position: relative; | ||
18 | } | 19 | } |
19 | .leftinside{ | 20 | .leftinside{ |
20 | height: 100%; | 21 | height: 100%; |
@@ -271,4 +272,15 @@ | |||
271 | font-size: 12px; | 272 | font-size: 12px; |
272 | text-shadow: 1px 1px 1px black; | 273 | text-shadow: 1px 1px 1px black; |
273 | color: white; | 274 | color: white; |
274 | } \ No newline at end of file | 275 | } |
276 | .timeline-disabled { | ||
277 | position: absolute; | ||
278 | top: 0px; | ||
279 | left: 0px; | ||
280 | width: 100%; | ||
281 | height: 100%; | ||
282 | background-color: rgba(30,30,30, 0.796); | ||
283 | z-index: 100; | ||
284 | display: none; | ||
285 | box-shadow: rgb(17, 17, 17) 0px 0px 14px inset; | ||
286 | } | ||