Hi,
Is there any way to get the mouse x,y of the dock as it's being dragged? I have javascript examples that use dataTransfer, and have tried adapting them to dock events, OnClientDragStarted, OnClientDrag and OnClientDragEnd. But OnClientDragStarted, which does provide access to the "OriginalEvent", does not have dataTransfer defined. And OnClientDrag provides no access to the "OriginalEvent".
Can you provide some direction? Or is just not possible.
Dave
Any issues with this approach?
function onDockDragStart(sender, args) {
var rect = sender.get_element().getBoundingClientRect();
var lsPosition = rect.left.toString() + ", " + rect.top.toString();
sender.set_title(lsPosition);
}
function onDockDrag(sender, args) {
var rect = sender.get_element().getBoundingClientRect();
var lsPosition = rect.left.toString() + ", " + rect.top.toString();
sender.set_title(lsPosition);
}
function onDockDragEnd(sender, args) {
var rect = sender.get_element().getBoundingClientRect();
var lsPosition = rect.left.toString() + ", " + rect.top.toString();
sender.set_title(lsPosition);
}
Hi Dave, the found by you approach is absolutely correct (you are not using any private members as well) and I do not see any problems with it.