1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

added isDragging readonly property to visual stims.

This commit is contained in:
lgtst 2023-03-31 18:34:37 +01:00
parent a445416d1f
commit 968c52505d

View File

@ -103,6 +103,14 @@ export class VisualStim extends util.mix(MinimalStim).with(WindowMixin)
this._needPixiUpdate = true;
}
/**
* Whether or not stimuli is being dragged by pointer. Works in conjunction with draggable attribute.
*/
get isDragging()
{
return this._associatedPointerId !== undefined;
}
/**
* Force a refresh of the stimulus.
*