[ka-Map-users] Problems with onmouseout for viewport

Sébastien Roch sebastien.roch at epfl.ch
Thu Mar 29 07:02:03 EST 2007


Hi,
I was trying to arrange a behaviour while panning in ka-map :
if you pan and leave the viewport, then release the mouse button and come
back over the viewport, the layers continue to move according to the mouse,
but with the mouse button not clicked...

After check, it seems that the onmouseout event of the viewport doesn't work
very well :

in kaMap.js, line 772, we have : this.domObj.onmouseout = kaMap_onmouseout;

but now if you put an alert in the kaMap_onmouseout function, you "are
alerted" each time you leave a tile!

For our panning story, code in kaTool for onmouseout is : 

kaNavigator.prototype.onmouseout = function(e) {
	e = (e)?e:((event)?event:null);
	if (!e.target) e.target = e.srcElement;
	if (e.target.id == this.kaMap.domObj.id) {
        this.bMouseDown = false;
        return kaTool.prototype.onmouseout.apply(this, [e]);
	}
};

So here the id of e.target will be the id of the tile, then condition 
"if(e.target.id == this.kaMap.domObj.id)"
will never be true

Does anyone understand why the onmouseout event is triggered for tiles?!??
Thanks!

Sebastien



More information about the ka-Map-users mailing list