Hi Eric, Welcome to SPF!
and thanks for your interest in X 
There have been a few times where I've noticed the need for this too - but currently there is no way to get the event. So I'll make a change so that the event object is also passed to the callback functions. The question is... do I pass the xEvent object, or the native event object? My idea for now is to pass the xEvent object.
I'll try to get this done soon, but tbh my to-do list for X is quite long
. You can go ahead and make the change in your copy, and I'll try to get the change into the next X release. In the following snippets (from xEnableDrag) I've added 'ev' as the last argument in the calls to the callback functions, that is the only change you'll have to make:
Code:
function _xOMD(e) // drag start
{
...
if (t.xODS) { t.xODS(t, ev.pageX, ev.pageY, ev); } // added ev as last argument
}
}
function _xOMM(e) // drag
{
...
if (el.xOD) { el.xOD(el, dx, dy, b, ev); } // added ev as last argument
else if (b) { xMoveTo(el, xLeft(el) + dx, xTop(el) + dy); }
}
}
function _xOMU(e) // drag end
{
...
_xDrgMgr.ele.xODE(_xDrgMgr.ele, ev.pageX, ev.pageY, ev); // added ev as last argument
}
_xDrgMgr.ele = null;
}
}
Thanks!
Bookmarks