If attach events to the marker element really can cause performance problems,
we can create the events object in the marker's constructor without attach the events to the DOM element, and than attach the events to the DOM element in the draw method.
initialize: function(lonlat, icon) {
....
this.events = new OpenLayers.Events(this, null, null);
},
draw: function(px) {
var div = this.icon.draw(px);
this.events.attachToElement(div);
return div;
},
BTW: May be need allow events to fall through, otherwise, the map element can not capture the mouseup event when using the box handler and release mouse on the marker element.
Li XinGang
EMail:
[hidden email]Blog:
avlee.cnblogs.comSite:
www.mapboost.org
On Tue, Oct 27, 2009 at 4:42 AM, Andreas Hocevar
<[hidden email]> wrote:
Hi,
reverted that change due to lack of a better solution.
Regards,
Andreas.
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev