Change the PanZoom control (ticket #573) to register via Event.observe,
which correctly cleans up memory usage. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2910 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -84,9 +84,12 @@ OpenLayers.Control.PanZoom.prototype =
|
||||
//we want to add the outer div
|
||||
this.div.appendChild(btn);
|
||||
|
||||
btn.onmousedown = this.buttonDown.bindAsEventListener(btn);
|
||||
btn.onmouseup = this.doubleClick.bindAsEventListener(btn);
|
||||
btn.ondblclick = this.doubleClick.bindAsEventListener(btn);
|
||||
OpenLayers.Event.observe(btn, "mousedown",
|
||||
this.buttonDown.bindAsEventListener(btn));
|
||||
OpenLayers.Event.observe(btn, "mouseup",
|
||||
this.doubleClick.bindAsEventListener(btn));
|
||||
OpenLayers.Event.observe(btn, "dblclick",
|
||||
this.doubleClick.bindAsEventListener(btn));
|
||||
btn.action = id;
|
||||
btn.map = this.map;
|
||||
btn.slideFactor = this.slideFactor;
|
||||
|
||||
Reference in New Issue
Block a user