Interaction.start(action, interactable, element)⚓➭
Start an action with the given Interactable and Element as tartgets. The action must be enabled for the target Interactable and an appropriate number of pointers must be held down – 1 for drag/resize, 2 for gesture.
Use it with interactable.<action>able({ manualStart: false })
to always
start actions manually
Parameters
- action object The action to be performed - drag, resize, etc.
- interactable Interactable The Interactable to target
- element Element The DOM Element to target
Returns: object interact
interact(target)
.draggable({
// disable the default drag start by down->move
manualStart: true
})
// start dragging after the user holds the pointer down
.on('hold', function (event) {
var interaction = event.interaction;
if (!interaction.interacting()) {
interaction.start({ name: 'drag' },
event.interactable,
event.currentTarget);
}
});