Permalink
Browse files

[#2308] Update timeline when editor panel hides or displays.

  • Loading branch information...
1 parent a4b3d73 commit 8dd884eed092c36bca39fb44874846e611811a2f @ScottDowne ScottDowne committed Sep 24, 2012
Showing with 9 additions and 6 deletions.
  1. +7 −0 src/timeline/media.js
  2. +2 −2 src/timeline/super-scrollbar.js
  3. +0 −2 src/timeline/timebar.js
  4. +0 −2 src/util/scrollbars.js
@@ -49,8 +49,15 @@ define( [ "core/trackevent", "core/track", "core/eventmanager",
function onEditorMinimized( e ) {
_timebar.update();
_tracksContainer.update();
+ _superScrollbar.resize();
}
+ window.addEventListener( "resize", function() {
+ _vScrollBar.update();
+ _timebar.update();
+ _superScrollbar.resize();
+ }, false );
+
function onMediaTimeUpdate() {
// Move the viewport to be centered around the scrubber
_tracksContainer.followCurrentTime();
@@ -364,10 +364,10 @@ define( [ "util/lang", "text!layouts/super-scrollbar.html" ],
updateView();
});
- window.addEventListener( "resize", function() {
+ _this.resize = function() {
_this.update();
_boundsChangedCallback( _viewPort.offsetLeft / _rect.width, _viewPort.offsetWidth / _rect.width );
- });
+ };
Object.defineProperties( this, {
element: {
@@ -109,8 +109,6 @@ define( [ "util/lang", "./scrubber" ], function( util, Scrubber ) {
});
_tracksContainer.element.addEventListener( "scroll", drawTicks, false );
- window.addEventListener( "resize", drawTicks, false );
-
this.update = function() {
drawTicks();
};
@@ -116,7 +116,6 @@ define( [ "core/eventmanager" ], function( EventManagerWrapper ){
outerElement.scrollTop = ( _scrollHeight - _elementHeight ) * p;
}, false);
- window.addEventListener( "resize", _this.update, false );
_handle.addEventListener( "mousedown", onMouseDown, false );
_this.update();
@@ -239,7 +238,6 @@ define( [ "core/eventmanager" ], function( EventManagerWrapper ){
outerElement.scrollLeft = ( _scrollWidth - _elementWidth ) * p;
}, false);
- window.addEventListener( "resize", _this.update, false );
_handle.addEventListener( "mousedown", onMouseDown, false );
_this.update();

0 comments on commit 8dd884e

Please sign in to comment.