Skip to main content

Home > @jsplumb/test > BrowserUITestSupport > aSyncDragNodeBy

BrowserUITestSupport.aSyncDragNodeBy() method#

Drag an element, asynchronously, by a given delta in x and y. "Asynchronously" here means that the initial mousedown event is fired on the current tick, followed by any beforeMouseMove handler, and then a timeout is set, the callback for which performs the mouse move, followed by a call to any beforeMouseUp handler. Then another timeout is set, the callback for which performs the mouseup and calls any after handler.

Signature:

aSyncDragNodeBy(el: Element, x: number, y: number, events?: EventHandlers): void;

Parameters#

ParameterTypeDescription
elElementElement to drag
xnumberX delta
ynumberY delta
eventsEventHandlersMap of lifecycle event handlers

Returns:

void