[ka-Map-users] Keymap

Lorenzo Becchi lorenzo at ominiverdi.com
Fri Dec 2 13:59:30 EST 2005


A kaKeymap.js bug fixed 
Double click centering (near line 220)

this is the new aPixPos function
---------------------------------------------------------------
kaKeymap.prototype.aPixPos = function( x, y ) 
{	
//     var obj = this.domObj.offsetParent;
    var obj = this.domObj;//new line
    var offsetLeft = 0;
    var offsetTop = 0;
    while (obj)
    {
        offsetLeft += parseFloat(obj.offsetLeft);
        offsetTop += parseFloat(obj.offsetTop);
        obj = obj.offsetParent;
    }
    var pX = x  - offsetLeft ;
    var pY = y  -  offsetTop ;
     pX = parseFloat(this.aExtents[0] + (this.cellWidth *pX)); 
     pY = parseFloat(this.aExtents[3] - (this.cellHeight *pY));
	//alert(pX+','+pY);
    return [pX,pY];
}
---------------------------------------------------------------

ciao 
Lorenzo


More information about the ka-Map-users mailing list