Hi. I've found a problem in OpenLayers.Handler.Box; when you draw a box and
move fast from negative to positive coordinates in firefox, the mouse cursor
do not follow exactly the box.
The code that give problem is :
if (xy.x < this.dragHandler.start.x) {
this.zoomBox.style.left = xy.x+"px";
}
if (xy.y < this.dragHandler.start.y) {
this.zoomBox.style.top = xy.y+"px";
}
if i move mouse very fast, firefox lost some events and the top/left value
remain with old values also if i go in positive area.
A possible solution is :
if (xy.x < this.dragHandler.start.x) {
this.zoomBox.style.left = xy.x+"px";
}
else{
this.zoomBox.style.left = this.dragHandler.start.x+"px";
}
if (xy.y < this.dragHandler.start.y) {
this.zoomBox.style.top = xy.y+"px";
}
else{
this.zoomBox.style.top = this.dragHandler.start.y+"px";
}
Andrea Di Nora.
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev