pandorafms/pandora_console/include/styles/cb/lib/xhaspoint.js

13 lines
448 B
JavaScript

// xHasPoint, Copyright 2001-2005 Michael Foster (Cross-Browser.com)
// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL
function xHasPoint(e,x,y,t,r,b,l)
{
if (!xNum(t)){t=r=b=l=0;}
else if (!xNum(r)){r=b=l=t;}
else if (!xNum(b)){l=r; b=t;}
var eX = xPageX(e), eY = xPageY(e);
return (x >= eX + l && x <= eX + xWidth(e) - r &&
y >= eY + t && y <= eY + xHeight(e) - b );
}