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:
@@ -513,7 +513,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
this.viewPortDiv.appendChild(this.layerContainerDiv);
|
||||
|
||||
this.events = new OpenLayers.Events(this,
|
||||
this.div,
|
||||
this.viewPortDiv,
|
||||
this.EVENT_TYPES,
|
||||
this.fallThrough,
|
||||
{includeXY: true});
|
||||
@@ -610,7 +610,6 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
render: function(div) {
|
||||
this.div = OpenLayers.Util.getElement(div);
|
||||
OpenLayers.Element.addClass(this.div, 'olMap');
|
||||
this.events.attachToElement(this.div);
|
||||
this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
|
||||
this.div.appendChild(this.viewPortDiv);
|
||||
this.updateSize();
|
||||
|
||||
Reference in New Issue
Block a user