Make it so getMousePosition does not report incorrect position when borders are used in containing elements, by replacing the pagePosition method with a new one and attaching map events to the internal viewport div instead of the user provided map div. r=erilem,tschaub (closes #2247)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10871 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -397,7 +397,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
* evt - {Object}
|
||||
*/
|
||||
adjustXY: function(evt) {
|
||||
var pos = OpenLayers.Util.pagePosition(this.map.div);
|
||||
var pos = OpenLayers.Util.pagePosition(this.map.viewPortDiv);
|
||||
evt.xy.x -= pos[0];
|
||||
evt.xy.y -= pos[1];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user