shrunken tab bar couldn't be resized by drag and drop because the tab bar was unexpectedly expanded near the resizer.

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-11-30 23:22:16 +09:00
parent e3b5a236d8
commit e0d949b99e

View File

@ -384,33 +384,34 @@ AutoHideBrowser.prototype = {
var sensitiveArea = this.sensitiveArea; var sensitiveArea = this.sensitiveArea;
/* For resizing of shrunken tab bar and clicking closeboxes, /* For resizing of shrunken tab bar and clicking closeboxes,
we have to shrink sensitive area a little. */ we have to shrink sensitive area a little. */
if (this.shrunken) sensitiveArea -= 20; if (this.shrunken) sensitiveArea = -24;
if ( if (
pos == 'left' ? pos == 'left' ?
(aEvent.screenX <= box.screenX) : (aEvent.screenX > box.screenX + sensitiveArea) :
pos == 'right' ? pos == 'right' ?
(aEvent.screenX >= box.screenX + box.width) : (aEvent.screenX < box.screenX + box.width - sensitiveArea) :
pos == 'bottom' ? pos == 'bottom' ?
(aEvent.screenY >= box.screenY + box.height) : (aEvent.screenY < box.screenY + box.height - sensitiveArea) :
(aEvent.screenY <= box.screenY) (aEvent.screenY > box.screenY + sensitiveArea)
) ) {
return this.MOUSE_POSITION_OUTSIDE;
}
if (
pos == 'left' ?
(aEvent.screenX <= box.screenX - sensitiveArea) :
pos == 'right' ?
(aEvent.screenX >= box.screenX + box.width + sensitiveArea) :
pos == 'bottom' ?
(aEvent.screenY >= box.screenY + box.height + sensitiveArea) :
(aEvent.screenY <= box.screenY - sensitiveArea)
) {
return this.MOUSE_POSITION_INSIDE; return this.MOUSE_POSITION_INSIDE;
}
if ( return this.MOUSE_POSITION_NEAR;
pos == 'left' ?
(aEvent.screenX <= box.screenX + sensitiveArea) :
pos == 'right' ?
(aEvent.screenX >= box.screenX + box.width - sensitiveArea) :
pos == 'bottom' ?
(aEvent.screenY >= box.screenY + box.height - sensitiveArea) :
(aEvent.screenY <= box.screenY + sensitiveArea)
)
return this.MOUSE_POSITION_NEAR;
return this.MOUSE_POSITION_OUTSIDE;
}, },
MOUSE_POSITION_UNKNOWN : 0, MOUSE_POSITION_UNKNOWN : 0,
MOUSE_POSITION_OUTSIDE : (1 << 0), MOUSE_POSITION_OUTSIDE : (1 << 0),