diff --git a/lib/OpenLayers/Handler/Box.js b/lib/OpenLayers/Handler/Box.js index 3cd325e12b..c9f7a3e82d 100644 --- a/lib/OpenLayers/Handler/Box.js +++ b/lib/OpenLayers/Handler/Box.js @@ -102,7 +102,7 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, { // depending on the box model, modify width and height to take borders // of the box into account - var box = this.getBoxCharacteristics(deltaX, deltaY); + var box = this.getBoxCharacteristics(); if (box.newBoxModel) { if (xy.x > startX) { this.zoomBox.style.width = @@ -173,7 +173,17 @@ OpenLayers.Handler.Box = OpenLayers.Class(OpenLayers.Handler, { } }, - getBoxCharacteristics: function(dx, dy) { + /** + * Method: getCharacteristics + * Determines offset and box model for a box. + * + * Returns: + * {Object} a hash with the following properties: + * - xOffset - Corner offset in x-direction + * - yOffset - Corner offset in y-direction + * - newBoxModel - true for all browsers except IE in quirks mode + */ + getBoxCharacteristics: function() { if (!this.boxCharacteristics) { var xOffset = parseInt(OpenLayers.Element.getStyle(this.zoomBox, "border-left-width")) + parseInt(OpenLayers.Element.getStyle(