From dd41ac769303cd0bb5b168258d1ac8082a437b7b Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 14 Sep 2006 20:58:46 +0000 Subject: [PATCH] redo of r1438 to make popup use new Events-Fall-Through functionality (as introduced with r1468) git-svn-id: http://svn.openlayers.org/trunk/openlayers@1470 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Popup.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/OpenLayers/Popup.js b/lib/OpenLayers/Popup.js index 3c525be786..429fba4a71 100644 --- a/lib/OpenLayers/Popup.js +++ b/lib/OpenLayers/Popup.js @@ -250,18 +250,16 @@ OpenLayers.Popup.prototype = { * hyperlinks or drag-selecting text. */ registerEvents:function() { - Event.observe(this.div, "mousedown", - this.onmousedown.bindAsEventListener(this)); - Event.observe(this.div, "mousemove", - this.onmousemove.bindAsEventListener(this)); - Event.observe(this.div, "mouseup", - this.onmouseup.bindAsEventListener(this)); - Event.observe(this.div, "click", - OpenLayers.Util.safeStopPropagation); - Event.observe(this.div, "mouseout", - this.onmouseout.bindAsEventListener(this)); - Event.observe(this.div, "dblclick", - OpenLayers.Util.safeStopPropagation); + this.events = new OpenLayers.Events(this, this.div, null, true); + + this.events.register("mousedown", this, this.onmousedown); + this.events.register("mousemove", this, this.onmousemove); + this.events.register("mouseup", this, this.onmouseup); + this.events.register("click", this, + OpenLayers.Util.safeStopPropagation); + this.events.register("mouseout", this, this.onmouseout); + this.events.register("dblclick", this, + OpenLayers.Util.safeStopPropagation); }, /** When mouse goes down within the popup, make a note of