diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | 1 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 16 |
2 files changed, 13 insertions, 4 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html index 19709ca7..8ddc81cd 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html | |||
@@ -31,6 +31,7 @@ | |||
31 | "container_tracks" : {"#" : "container-tracks"}, | 31 | "container_tracks" : {"#" : "container-tracks"}, |
32 | "end_hottext" : {"@" : "endHottext"}, | 32 | "end_hottext" : {"@" : "endHottext"}, |
33 | "container_layers" : {"#" : "container-layers"}, | 33 | "container_layers" : {"#" : "container-layers"}, |
34 | "container_tracks" : {"#" : "container-tracks"}, | ||
34 | "timeline_disabler" : {"#" : "timeline-disabler"}, | 35 | "timeline_disabler" : {"#" : "timeline-disabler"}, |
35 | "checkable_relative" : {"#" : "checkable_relative"}, | 36 | "checkable_relative" : {"#" : "checkable_relative"}, |
36 | "checkable_absolute" : {"#" : "checkable_absolute"}, | 37 | "checkable_absolute" : {"#" : "checkable_absolute"}, |
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index cb4fbf07..3fc8eeaf 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -177,7 +177,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
177 | }, | 177 | }, |
178 | set:function (val) { | 178 | set:function (val) { |
179 | this._masterDuration = val; | 179 | this._masterDuration = val; |
180 | this.timebar.style.width = (this._masterDuration / 12) + "px"; | 180 | var intDur = Math.round(val/12), |
181 | strWidth = intDur + "px"; | ||
182 | this.timebar.style.width = strWidth; | ||
181 | } | 183 | } |
182 | }, | 184 | }, |
183 | 185 | ||
@@ -350,6 +352,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
350 | this.container_layers.addEventListener("dragstart", this.handleLayerDragStart.bind(this), false); | 352 | this.container_layers.addEventListener("dragstart", this.handleLayerDragStart.bind(this), false); |
351 | this.container_layers.addEventListener("dragend", this.handleLayerDragEnd.bind(this), false); | 353 | this.container_layers.addEventListener("dragend", this.handleLayerDragEnd.bind(this), false); |
352 | this.container_layers.addEventListener("dragover", this.handleLayerDragover.bind(this), false); | 354 | this.container_layers.addEventListener("dragover", this.handleLayerDragover.bind(this), false); |
355 | //this.container_tracks.addEventListener("dragover", this.handleKeyframeDragover.bind(this), false); | ||
353 | this.container_layers.addEventListener("drop", this.handleLayerDrop.bind(this), false); | 356 | this.container_layers.addEventListener("drop", this.handleLayerDrop.bind(this), false); |
354 | 357 | ||
355 | // Bind the handlers for the config menu | 358 | // Bind the handlers for the config menu |
@@ -530,8 +533,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
530 | "deleteLayer", | 533 | "deleteLayer", |
531 | "elementAdded", | 534 | "elementAdded", |
532 | "elementsRemoved", | 535 | "elementsRemoved", |
533 | "elementReplaced", | 536 | "elementReplaced"], |
534 | "selectionChange"], | 537 | //"selectionChange"], |
535 | i, | 538 | i, |
536 | arrEventsLength = arrEvents.length; | 539 | arrEventsLength = arrEvents.length; |
537 | 540 | ||
@@ -710,12 +713,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
710 | this._openDoc = false; | 713 | this._openDoc = false; |
711 | this.end_hottext.value = 25; | 714 | this.end_hottext.value = 25; |
712 | this.updateTrackContainerWidth(); | 715 | this.updateTrackContainerWidth(); |
713 | this.masterDuration = 0; | ||
714 | // Clear the repetitions | 716 | // Clear the repetitions |
715 | if (this.arrLayers.length > 0) { | 717 | if (this.arrLayers.length > 0) { |
716 | this.arrLayers = []; | 718 | this.arrLayers = []; |
717 | this.arrLayers.length = 0; | 719 | this.arrLayers.length = 0; |
718 | } | 720 | } |
721 | this.resetMasterDuration(); | ||
719 | } | 722 | } |
720 | }, | 723 | }, |
721 | 724 | ||
@@ -1498,6 +1501,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1498 | this.needsDraw = true; | 1501 | this.needsDraw = true; |
1499 | } | 1502 | } |
1500 | }, | 1503 | }, |
1504 | handleKeyframeDragover: { | ||
1505 | value: function(event) { | ||
1506 | |||
1507 | } | ||
1508 | }, | ||
1501 | handleLayerDragEnd : { | 1509 | handleLayerDragEnd : { |
1502 | value: function(event) { | 1510 | value: function(event) { |
1503 | this._deleteHelper = true; | 1511 | this._deleteHelper = true; |