dragselect 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/DragSelect.d.ts +1 -1
  3. package/dist/DragSelect.es6m.js +3886 -0
  4. package/dist/DragSelect.esm.js +2 -2
  5. package/dist/DragSelect.js +2 -2
  6. package/dist/ds.es6m.min.js +1 -0
  7. package/dist/ds.esm.min.js +1 -1
  8. package/dist/ds.min.js +1 -1
  9. package/dist/methods/addModificationObservers.d.ts +11 -0
  10. package/dist/methods/canScroll.d.ts +3 -0
  11. package/dist/methods/createSelectorAreaElement.d.ts +3 -0
  12. package/dist/methods/createSelectorElement.d.ts +3 -0
  13. package/dist/methods/debounce.d.ts +3 -0
  14. package/dist/methods/documentScroll.d.ts +6 -0
  15. package/dist/methods/getAllParentNodes.d.ts +3 -0
  16. package/dist/methods/getAreaRect.d.ts +3 -0
  17. package/dist/methods/getBoundingClientRect.d.ts +4 -0
  18. package/dist/methods/getCurrentScroll.d.ts +3 -0
  19. package/dist/methods/getOverflowEdges.d.ts +7 -0
  20. package/dist/methods/getPointerPos.d.ts +5 -0
  21. package/dist/methods/getSelectorPosition.d.ts +12 -0
  22. package/dist/methods/getStylePosition.d.ts +3 -0
  23. package/dist/methods/handleElementOverflow.d.ts +10 -0
  24. package/dist/methods/handleElementPositionAttribute.d.ts +6 -0
  25. package/dist/methods/handleKeyboardDragPosDifference.d.ts +13 -0
  26. package/dist/methods/handleSelection.d.ts +9 -0
  27. package/dist/methods/handleUnSelection.d.ts +9 -0
  28. package/dist/methods/hydrateSettings.d.ts +3 -0
  29. package/dist/methods/index.d.ts +30 -0
  30. package/dist/methods/isCollision.d.ts +13 -0
  31. package/dist/methods/moveElement.d.ts +8 -0
  32. package/dist/methods/removeModificationObservers.d.ts +3 -0
  33. package/dist/methods/scrollElement.d.ts +3 -0
  34. package/dist/methods/setStylePosition.d.ts +3 -0
  35. package/dist/methods/subscriberAliases.d.ts +14 -0
  36. package/dist/methods/toArray.d.ts +3 -0
  37. package/dist/methods/updateElementStylePos.d.ts +8 -0
  38. package/dist/methods/vect2.d.ts +8 -0
  39. package/dist/modules/Area.d.ts +80 -0
  40. package/dist/modules/Drag.d.ts +71 -0
  41. package/dist/modules/DropZone.d.ts +90 -0
  42. package/dist/modules/DropZones.d.ts +73 -0
  43. package/dist/modules/Interaction.d.ts +51 -0
  44. package/dist/modules/PubSub.d.ts +37 -0
  45. package/dist/modules/SelectableSet.d.ts +43 -0
  46. package/dist/modules/SelectedSet.d.ts +32 -0
  47. package/dist/modules/Selection.d.ts +54 -0
  48. package/dist/modules/Selector.d.ts +29 -0
  49. package/dist/modules/SelectorArea.d.ts +58 -0
  50. package/dist/modules/index.d.ts +11 -0
  51. package/dist/stores/KeyStore.d.ts +34 -0
  52. package/dist/stores/PointerStore.d.ts +83 -0
  53. package/dist/stores/ScrollStore.d.ts +38 -0
  54. package/dist/stores/SettingsStore.d.ts +39 -0
  55. package/dist/stores/index.d.ts +5 -0
  56. package/dist/types.d.ts +276 -0
  57. package/package.json +1 -1
@@ -0,0 +1,71 @@
1
+ export default class Drag {
2
+ /**
3
+ * @constructor Drag
4
+ * @param {{DS:DragSelect}} obj
5
+ * @ignore
6
+ */
7
+ constructor({ DS }: {
8
+ DS: DragSelect;
9
+ });
10
+ /**
11
+ * @type {Vect2}
12
+ * @private
13
+ */
14
+ private _prevCursorPos;
15
+ /**
16
+ * @type {Vect2}
17
+ * @private
18
+ */
19
+ private _prevScrollPos;
20
+ /**
21
+ * @type {DSElements}
22
+ * @private
23
+ */
24
+ private _elements;
25
+ /**
26
+ * @type {DSDragKeys}
27
+ * @private
28
+ */
29
+ private _dragKeys;
30
+ /**
31
+ * @type {string[]}
32
+ * @private
33
+ */
34
+ private _dragKeysFlat;
35
+ /**
36
+ * @type {DSBoundingRect}
37
+ * @private
38
+ */
39
+ private _selectionRect;
40
+ DS: DragSelect;
41
+ assignDragkeys: () => void;
42
+ keyboardDrag: ({ event, key }: {
43
+ event: any;
44
+ key: any;
45
+ }) => void;
46
+ keyboardEnd: ({ event, key }: {
47
+ event: any;
48
+ key: any;
49
+ }) => void;
50
+ start: ({ isDragging, isDraggingKeyboard }: {
51
+ isDragging: any;
52
+ isDraggingKeyboard: any;
53
+ }) => void;
54
+ stop: (evt: any) => void;
55
+ update: ({ isDragging, isDraggingKeyboard }: {
56
+ isDragging: any;
57
+ isDraggingKeyboard: any;
58
+ }) => void;
59
+ /**
60
+ * Modify direction value so that the rect of draggable elements
61
+ * does not exceed the boundaries of container rect
62
+ * @param {Vect2} direction
63
+ * @return {Vect2}
64
+ */
65
+ limitDirection: (direction: Vect2) => Vect2;
66
+ handleZIndex: (add: any) => void;
67
+ get _cursorDiff(): Vect2;
68
+ get _scrollDiff(): Vect2;
69
+ }
70
+ import DragSelect from "../DragSelect";
71
+ import "../types"
@@ -0,0 +1,90 @@
1
+ export default class DropZone {
2
+ /**
3
+ * @constructor Drag
4
+ * @param {Object} obj
5
+ * @param {DragSelect} obj.DS
6
+ * @param {string} obj.id
7
+ * @param {DSElement} obj.element
8
+ * @param {DSInputElements} [obj.droppables]
9
+ * @ignore
10
+ */
11
+ constructor({ DS, id, element, droppables }: {
12
+ DS: DragSelect;
13
+ id: string;
14
+ element: DSElement;
15
+ droppables?: DSInputElements;
16
+ });
17
+ /**
18
+ * @type {string}
19
+ */
20
+ id: string;
21
+ /**
22
+ * @type {DSElement}
23
+ */
24
+ element: DSElement;
25
+ /**
26
+ * @type {DSElements}
27
+ */
28
+ _droppables: DSElements;
29
+ /**
30
+ * @type {DOMRect}
31
+ * @private
32
+ */
33
+ private _rect;
34
+ /**
35
+ * @type {{cleanup:()=>void}}
36
+ * @private
37
+ */
38
+ private _observers;
39
+ /**
40
+ * @type {NodeJS.Timeout}
41
+ * @private
42
+ */
43
+ private _timeout;
44
+ /**
45
+ * @type {DSElements}
46
+ * @private
47
+ */
48
+ private _itemsDropped;
49
+ /**
50
+ * @type {DSElements}
51
+ * @private
52
+ */
53
+ private _itemsInside;
54
+ DS: DragSelect;
55
+ Settings: Settings;
56
+ set droppables(arg: DSElements);
57
+ get droppables(): DSElements;
58
+ /**
59
+ * @param {'add'|'remove'} action
60
+ */
61
+ setReadyClasses: (action: 'add' | 'remove') => void;
62
+ /**
63
+ * This zone is NOT the target of a drop
64
+ */
65
+ handleNoDrop: () => void;
66
+ /**
67
+ * This zone IS the target of a drop
68
+ */
69
+ handleDrop: () => void;
70
+ handleItemsInsideClasses: () => void;
71
+ start: ({ isDragging }: {
72
+ isDragging: any;
73
+ }) => void;
74
+ stop: ({ isDragging }: {
75
+ isDragging: any;
76
+ }) => void;
77
+ destroy(): void;
78
+ isDestroyed: boolean;
79
+ /**
80
+ * @returns {DSDropZone}
81
+ */
82
+ toObject: () => DSDropZone;
83
+ get rect(): DOMRect;
84
+ get itemsDropped(): DSElements;
85
+ get itemsInside(): DSElements;
86
+ get parentNodes(): DSElements;
87
+ _parentNodes: DSElements;
88
+ }
89
+ import DragSelect from "../DragSelect";
90
+ import "../types"
@@ -0,0 +1,73 @@
1
+ export default class DropZones {
2
+ /**
3
+ * @constructor Drag
4
+ * @param {{DS:DragSelect}} obj
5
+ * @ignore
6
+ */
7
+ constructor({ DS }: {
8
+ DS: DragSelect;
9
+ });
10
+ /**
11
+ * Get the drop zone by the zone element
12
+ * @type {Map<DSElement, DropZone>}
13
+ * @private
14
+ */
15
+ private _zoneByElement;
16
+ /**
17
+ * Get the drop zone by the zone id
18
+ * @type {Map<string, DropZone>}
19
+ * @private
20
+ */
21
+ private _zoneById;
22
+ /**
23
+ * Get the drop zones by one zone item
24
+ * @type {Map<DSElement,DropZone[]>}
25
+ * @private
26
+ */
27
+ private _zonesByDroppable;
28
+ /**
29
+ * Get the drop zones by one zone item
30
+ * @type {DropZone[]}
31
+ * @private
32
+ */
33
+ private _zones;
34
+ DS: DragSelect;
35
+ Settings: Settings;
36
+ /**
37
+ * @param {Object} obj
38
+ * @param {DSDropZone[]} [obj.dropZones]
39
+ */
40
+ setDropZones: ({ dropZones }: {
41
+ dropZones?: DSDropZone[];
42
+ }) => void;
43
+ _handleDrop: (target: any) => void;
44
+ /**
45
+ * @param {DSElements} elements
46
+ * @param {Vect2} point
47
+ * @returns {DropZone|undefined}
48
+ */
49
+ _getZoneByElementsFromPoint: (elements: DSElements, { x, y }: Vect2) => DropZone | undefined;
50
+ stop: ({ isDragging }: {
51
+ isDragging: any;
52
+ }) => void;
53
+ /**
54
+ * @param {string} zoneId
55
+ * @returns {DSElements|void}
56
+ */
57
+ getItemsDroppedById: (zoneId: string) => DSElements | void;
58
+ /**
59
+ * @param {string} zoneId
60
+ * @param {boolean} addClasses
61
+ * @returns {DSElements|void}
62
+ */
63
+ getItemsInsideById: (zoneId: string, addClasses: boolean) => DSElements | void;
64
+ /**
65
+ * Returns first DropsZone under current pointer
66
+ * @param {Vect2} [coordinates]
67
+ * @returns {DropZone | undefined}
68
+ */
69
+ getTarget: (coordinates?: Vect2) => DropZone | undefined;
70
+ }
71
+ import DragSelect from "../DragSelect";
72
+ import DropZone from "./DropZone";
73
+ import "../types"
@@ -0,0 +1,51 @@
1
+ export default class Interaction {
2
+ /**
3
+ * @constructor Interaction
4
+ * @param {{DS:DragSelect}} obj
5
+ * @ignore
6
+ */
7
+ constructor({ DS }: {
8
+ DS: DragSelect;
9
+ });
10
+ /** @type {boolean} */
11
+ isInteracting: boolean;
12
+ /** @type {boolean} */
13
+ isDragging: boolean;
14
+ DS: DragSelect;
15
+ Settings: Settings;
16
+ init: () => void;
17
+ _init: () => void;
18
+ /**
19
+ * @param {DSEvent} event
20
+ */
21
+ _canInteract(event: DSEvent): boolean;
22
+ /**
23
+ * @param {DSEvent} event
24
+ */
25
+ start: (event: DSEvent) => void;
26
+ _start: (event: any) => void;
27
+ /**
28
+ * Drag interaction
29
+ * @param {DSEvent} event
30
+ * @returns {boolean}
31
+ */
32
+ isDragEvent: (event: DSEvent) => boolean;
33
+ /**
34
+ * Triggers when a node is actively selected: <button> nodes that are pressed via the keyboard.
35
+ * Making DragSelect accessible for everyone!
36
+ * @param {{ event:MouseEvent }} prop
37
+ */
38
+ onClick: ({ event }: {
39
+ event: MouseEvent;
40
+ }) => void;
41
+ stop: (area?: DSArea) => void;
42
+ update: ({ event, scroll_directions, scroll_multiplier }: {
43
+ event: any;
44
+ scroll_directions: any;
45
+ scroll_multiplier: any;
46
+ }) => void;
47
+ reset: (event: any) => void;
48
+ _reset: (event: any) => void;
49
+ }
50
+ import DragSelect from "../DragSelect";
51
+ import "../types"
@@ -0,0 +1,37 @@
1
+ export default class PubSub {
2
+ constructor({ DS }: {
3
+ DS: any;
4
+ });
5
+ subscribers: {};
6
+ DS: any;
7
+ /**
8
+ * Subscribe to an event
9
+ * @memberof DragSelect#
10
+ * @function subscribe
11
+ * @param {DSCallbackNames} eventName
12
+ * @param {DSCallback} callback
13
+ * @returns {number} event id, can be used to unsubscribe more efficiently
14
+ */
15
+ subscribe: (eventName: DSCallbackNames, callback: DSCallback) => number;
16
+ /**
17
+ * Removes event subscription
18
+ * @memberof DragSelect#
19
+ * @function unsubscribe
20
+ * @param {DSCallbackNames} eventName
21
+ * @param {DSCallback} [callback] the callback method signature, has to be exactly the same as when subscribing. Consider using "id" instead.
22
+ * @param {number} [id] event id returned when subscribed (more performant than callback search)
23
+ */
24
+ unsubscribe: (eventName: DSCallbackNames, callback?: DSCallback, id?: number) => void;
25
+ /**
26
+ * Publishes an event to all subscribers
27
+ * @memberof DragSelect#
28
+ * @function publish
29
+ * @param {DSCallbackNames|DSCallbackNames[]} eventName
30
+ * @param {CallbackObject} data passed to the subscription method
31
+ */
32
+ publish: (eventName: DSCallbackNames | DSCallbackNames[], data: CallbackObject) => void;
33
+ _publish: (eventName: any, data: any) => void;
34
+ _handlePublish: (subscribers: any, data: any) => void;
35
+ _handlePrePublish: (subscribers: any, data: any) => void;
36
+ }
37
+ import "../types"
@@ -0,0 +1,43 @@
1
+ export default class SelectableSet extends Set<any> {
2
+ /**
3
+ * @constructor SelectableSet
4
+ * @param {{DS:DragSelect}} obj
5
+ * @ignore
6
+ */
7
+ constructor({ DS }: {
8
+ DS: DragSelect;
9
+ });
10
+ /**
11
+ * @type {Map<DSElement,DSBoundingRect>}
12
+ * @private
13
+ */
14
+ private _rects;
15
+ /**
16
+ * @type {NodeJS.Timeout}
17
+ * @private
18
+ */
19
+ private _timeout;
20
+ DS: DragSelect;
21
+ Settings: Settings;
22
+ init: () => void;
23
+ /**
24
+ * @param {DSElement} element
25
+ * @return {this}
26
+ * */
27
+ add(element: DSElement): this;
28
+ /** @param {DSElement} element */
29
+ delete(element: DSElement): boolean;
30
+ _onClick: (event: any) => void;
31
+ _onPointer: (event: any) => void;
32
+ /** @param {DSElements} elements */
33
+ addAll: (elements: DSElements) => void;
34
+ /** @param {DSElements} elements */
35
+ deleteAll: (elements: DSElements) => void;
36
+ /** @param {DSElement} element */
37
+ getRect: (element: DSElement) => DSBoundingRect | DOMRect;
38
+ /** @return {DSElements} */
39
+ get elements(): DSElements;
40
+ get rects(): Map<DSElement, DSBoundingRect>;
41
+ }
42
+ import DragSelect from "../DragSelect";
43
+ import "../types"
@@ -0,0 +1,32 @@
1
+ export default class SelectedSet extends Set<any> {
2
+ /**
3
+ * @constructor SelectableSet
4
+ * @param {{DS:DragSelect}} obj
5
+ * @ignore
6
+ */
7
+ constructor({ DS }: {
8
+ DS: DragSelect;
9
+ });
10
+ DS: DragSelect;
11
+ /**
12
+ * @param {DSElement} element
13
+ * @return {this}
14
+ * */
15
+ add(element: DSElement): this;
16
+ /** @param {DSElement} element */
17
+ delete(element: DSElement): boolean;
18
+ /**
19
+ * Adds/Removes an element. If it is already selected = remove, if not = add.
20
+ * @param {DSElement} element
21
+ * @return {DSElement}
22
+ */
23
+ toggle(element: DSElement): DSElement;
24
+ /** @param {DSElements} elements */
25
+ addAll: (elements: DSElements) => void;
26
+ /** @param {DSElements} elements */
27
+ deleteAll: (elements: DSElements) => void;
28
+ /** @return {DSElements} */
29
+ get elements(): DSElements;
30
+ }
31
+ import DragSelect from "../DragSelect";
32
+ import "../types"
@@ -0,0 +1,54 @@
1
+ export default class Selection {
2
+ /**
3
+ * @constructor Selection
4
+ * @param {{ DS:DragSelect }} p
5
+ * @ignore
6
+ */
7
+ constructor({ DS }: {
8
+ DS: DragSelect;
9
+ });
10
+ /**
11
+ * @type {Set}
12
+ * @private
13
+ * */
14
+ private _prevSelectedSet;
15
+ DS: DragSelect;
16
+ Settings: Settings;
17
+ /**
18
+ * Stores the previous selection (solves #9)
19
+ * @param {DSEvent} event
20
+ * @private
21
+ * */
22
+ private _storePrevious;
23
+ /** @param {{event:DSEvent,isDragging:boolean}} event */
24
+ start: ({ event, isDragging }: {
25
+ event: DSEvent;
26
+ isDragging: boolean;
27
+ }) => void;
28
+ update: ({ isDragging }: {
29
+ isDragging: any;
30
+ }) => void;
31
+ /**
32
+ * Checks if any selectable element is inside selection.
33
+ * @param {boolean} [force]
34
+ * @param {DSEvent} [event]
35
+ * @private
36
+ */
37
+ private _handleInsideSelection;
38
+ /**
39
+ * Can be overridden to apply further filtering logic after the items to select are identified but before they actually get selected
40
+ * Is expected to return the select / unselect maps in the same shape as passed in
41
+ * @param {{select:Map<DSElement,DSBoundingRect>, unselect:Map<DSElement,DSBoundingRect>, selectorRect:DSBoundingRect}} obj
42
+ * @returns {{select:Map<DSElement,DSBoundingRect>, unselect:Map<DSElement,DSBoundingRect>}}
43
+ */
44
+ filterSelected: ({ select, unselect, selectorRect }: {
45
+ select: Map<DSElement, DSBoundingRect>;
46
+ unselect: Map<DSElement, DSBoundingRect>;
47
+ selectorRect: DSBoundingRect;
48
+ }) => {
49
+ select: Map<DSElement, DSBoundingRect>;
50
+ unselect: Map<DSElement, DSBoundingRect>;
51
+ };
52
+ }
53
+ import DragSelect from "../DragSelect";
54
+ import "../types"
@@ -0,0 +1,29 @@
1
+ export default class Selector {
2
+ /**
3
+ * @constructor Selector
4
+ * @param {{ DS:DragSelect }} p
5
+ * @ignore
6
+ */
7
+ constructor({ DS }: {
8
+ DS: DragSelect;
9
+ });
10
+ /**
11
+ * @type {DSBoundingRect}
12
+ * @private
13
+ */
14
+ private _rect;
15
+ DS: DragSelect;
16
+ attachSelector: () => void;
17
+ HTMLNode: HTMLElement;
18
+ start: ({ isDragging }: {
19
+ isDragging: any;
20
+ }) => void;
21
+ stop: () => void;
22
+ /** Moves the selection to the correct place */
23
+ update: ({ isDragging }: {
24
+ isDragging: any;
25
+ }) => void;
26
+ get rect(): DSBoundingRect | DOMRect;
27
+ }
28
+ import DragSelect from "../DragSelect";
29
+ import "../types"
@@ -0,0 +1,58 @@
1
+ export default class SelectorArea {
2
+ /**
3
+ * @class SelectorArea
4
+ * @constructor SelectorArea
5
+ * @param {{ DS:DragSelect }} obj
6
+ * @ignore
7
+ */
8
+ constructor({ DS }: {
9
+ DS: DragSelect;
10
+ });
11
+ /**
12
+ * @type {*}
13
+ * @private
14
+ * */
15
+ private _scrollInterval;
16
+ /**
17
+ * @type {DSBoundingRect}
18
+ * @private
19
+ */
20
+ private _rect;
21
+ /**
22
+ * @type {DSEdges}
23
+ * @private
24
+ */
25
+ private currentEdges;
26
+ DS: DragSelect;
27
+ HTMLNode: HTMLDivElement;
28
+ start: () => void;
29
+ /**
30
+ * Adding / Removing elements to document
31
+ * @param {'append'|'remove'} method
32
+ */
33
+ applyElements: (method?: 'append' | 'remove') => void;
34
+ /** Updates the selectorAreas positions to match the areas */
35
+ updatePos: () => void;
36
+ stop: (remove: any) => void;
37
+ startAutoScroll: () => void;
38
+ /** Creates an interval that auto-scrolls while the cursor is near the edge */
39
+ handleAutoScroll: () => void;
40
+ stopAutoScroll: () => void;
41
+ /**
42
+ * Checks if the element is either inside the Selector Area
43
+ * (as a reachable child or touching the area)
44
+ * @param {DSElement} element
45
+ * @param {DSBoundingRect} [elementRect] - slight performance improvements
46
+ * @returns {boolean}
47
+ */
48
+ isInside: (element: DSElement, elementRect?: DSBoundingRect) => boolean;
49
+ /**
50
+ * checks if the click was triggered on the area.
51
+ * @param {DSEvent} [event]
52
+ * @returns {boolean}
53
+ */
54
+ isClicked(event?: DSEvent): boolean;
55
+ get rect(): DSBoundingRect | DOMRect;
56
+ }
57
+ import DragSelect from "../DragSelect";
58
+ import "../types"
@@ -0,0 +1,11 @@
1
+ export { default as Area } from "./Area";
2
+ export { default as Drag } from "./Drag";
3
+ export { default as DropZones } from "./DropZones";
4
+ export { default as Interaction } from "./Interaction";
5
+ export { default as PubSub } from "./PubSub";
6
+ export { default as SelectableSet } from "./SelectableSet";
7
+ export { default as SelectedSet } from "./SelectedSet";
8
+ export { default as Selection } from "./Selection";
9
+ export { default as Selector } from "./Selector";
10
+ export { default as SelectorArea } from "./SelectorArea";
11
+ import "../types"
@@ -0,0 +1,34 @@
1
+ export default class KeyStore {
2
+ /**
3
+ * @class KeyStore
4
+ * @constructor KeyStore
5
+ * @param {{DS:DragSelect}} p
6
+ * @ignore
7
+ */
8
+ constructor({ DS }: {
9
+ DS: DragSelect;
10
+ });
11
+ /**
12
+ * @type {Set<string>}
13
+ * @private
14
+ * */
15
+ private _currentValues;
16
+ /**
17
+ * @type {{control:string,shift:string,meta:string}}
18
+ * @private
19
+ * */
20
+ private _keyMapping;
21
+ DS: DragSelect;
22
+ init: () => void;
23
+ /** @param {KeyboardEvent} event */
24
+ keydown: (event: KeyboardEvent) => void;
25
+ /** @param {KeyboardEvent} event */
26
+ keyup: (event: KeyboardEvent) => void;
27
+ stop: () => void;
28
+ reset: () => void;
29
+ /** @param {KeyboardEvent|MouseEvent|PointerEvent|TouchEvent} [event] */
30
+ isMultiSelectKeyPressed(event?: KeyboardEvent | MouseEvent | PointerEvent | TouchEvent): boolean;
31
+ get currentValues(): string[];
32
+ }
33
+ import DragSelect from "../DragSelect";
34
+ import "../types"
@@ -0,0 +1,83 @@
1
+ export default class PointerStore {
2
+ /**
3
+ * @class PointerStore
4
+ * @constructor PointerStore
5
+ * @param {{DS:DragSelect}} p
6
+ * @ignore
7
+ */
8
+ constructor({ DS }: {
9
+ DS: DragSelect;
10
+ });
11
+ /** @type {boolean} */
12
+ _isMouseInteraction: boolean;
13
+ /**
14
+ * @type {Vect2}
15
+ * @private
16
+ * */
17
+ private _initialValArea;
18
+ /**
19
+ * @type {Vect2}
20
+ * @private
21
+ * */
22
+ private _currentValArea;
23
+ /**
24
+ * @type {Vect2}
25
+ * @private
26
+ * */
27
+ private _lastValArea;
28
+ /**
29
+ * @type {Vect2}
30
+ * @private
31
+ * */
32
+ private _initialVal;
33
+ /**
34
+ * @type {Vect2}
35
+ * @private
36
+ * */
37
+ private _currentVal;
38
+ /**
39
+ * @type {Vect2}
40
+ * @private
41
+ * */
42
+ private _lastVal;
43
+ /**
44
+ * @type {TouchEvent}
45
+ * @private
46
+ * */
47
+ private _lastTouch;
48
+ DS: DragSelect;
49
+ Settings: Settings;
50
+ init: () => void;
51
+ /** @param {DSEvent} [event] */
52
+ start(event?: DSEvent): void;
53
+ set currentVal(arg: Vect2);
54
+ /** Current pointer position */
55
+ get currentVal(): Vect2;
56
+ set initialVal(arg: Vect2);
57
+ /** First recorded pointer position */
58
+ get initialVal(): Vect2;
59
+ /** @param {DSEvent} event */
60
+ getPointerPosition: (event: DSEvent) => Vect2;
61
+ /** @param {DSEvent} [event] */
62
+ update: (event?: DSEvent) => void;
63
+ stop: () => void;
64
+ /** @param {DSEvent} [event] */
65
+ reset: (event?: DSEvent) => void;
66
+ set lastVal(arg: Vect2);
67
+ /** Last recorded pointer position */
68
+ get lastVal(): Vect2;
69
+ /**
70
+ * @param {DSEvent} event
71
+ * @return {MouseEvent|PointerEvent|Touch}
72
+ * @private
73
+ */
74
+ private _normalizedEvent;
75
+ /** First recorded pointer position within the area */
76
+ get initialValArea(): Vect2;
77
+ /** Current pointer position within the area */
78
+ get currentValArea(): Vect2;
79
+ /** Last recorded pointer position within the area */
80
+ get lastValArea(): Vect2;
81
+ }
82
+ import DragSelect from "../DragSelect";
83
+ import "../types"