Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Partially revert 3424529
  • Loading branch information
roccivic committed Nov 11, 2012
1 parent 7a4a297 commit 437c2ef
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions js/navigation.js
Expand Up @@ -483,16 +483,6 @@ var ResizeHandler = function () {
* Whether the user has initiated a resize operation
*/
this.active = false;
/**
* Whether we are busy rendering
*/
this.busy = false;
/**
* A position to which we were supposed to resize,
* but we couldn't because we were busy handling
* another resize operation
*/
this.saved = undefined;
/**
* @var int panel_width Used by the collapser to know where to go
* back to when uncollapsing the panel
Expand All @@ -510,7 +500,6 @@ var ResizeHandler = function () {
* @return void
*/
this.setWidth = function (pos) {
this.busy = true;
var $resizer = $('#pma_navigation_resizer');
var resizer_width = $resizer.width();
var $collapser = $('#pma_navigation_collapser');
Expand All @@ -536,19 +525,6 @@ var ResizeHandler = function () {
this.left,
(pos - $('#pma_navigation_scrollbar').width()) + 'px'
);

// Remove busy flag asynchronously, this way the event queue
// can clear up meanwhile. This speeds up rendering
var self = this;
setTimeout(function () {
if (typeof self.saved == 'undefined') {
self.busy = false;
} else {
var target = self.saved;
self.saved = undefined;
self.setWidth(target);
}
}, 40);
};
/**
* Returns the horizontal position of the mouse,
Expand Down Expand Up @@ -633,11 +609,7 @@ var ResizeHandler = function () {
if (event.data.resize_handler.active) {
event.preventDefault();
var pos = event.data.resize_handler.getPos(event);
if (! event.data.resize_handler.busy) {
event.data.resize_handler.setWidth(pos);
} else {
event.data.resize_handler.saved = pos;
}
event.data.resize_handler.setWidth(pos);
}
};
/**
Expand Down

0 comments on commit 437c2ef

Please sign in to comment.