UNPKG

@learn-hunger/visual-gestures

Version:

VisualGestures.js is a package that empowers users to effortlessly control the cursor, including actions such as hover, click, drag, and drop, through precise finger movements in the air.

19 lines 812 B
import { DefaultConfig } from "../../config/defalut-config"; import { EVgMouseEvents } from "../../utilities/vg-constants"; import { ACommonMouseProps } from "../abstracts/vg-pointer-props-abstract"; export class VgPointerDrag extends ACommonMouseProps { constructor(mouseProp, customProps) { super(EVgMouseEvents.MOUSE_DRAG, mouseProp, customProps); // this.setCursor(); } //todo setCursor() { const { path, scale, showCursor } = DefaultConfig.instance.cursor.vgpointerdrag; const { baseURI } = DefaultConfig.instance.cursor; if (showCursor && this.cursorElement.src != baseURI + path) { this.cursorElement.src = path; this.cursorElement.style.scale = scale.toString(); } } } //# sourceMappingURL=vg-pointer-drag.js.map