@dnd-kit/dom 0.2.2 → 0.2.3
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.
- package/index.cjs +3 -4
- package/index.cjs.map +1 -1
- package/index.d.cts +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -4
- package/index.js.map +1 -1
- package/package.json +5 -5
package/index.d.cts
CHANGED
|
@@ -76,7 +76,7 @@ declare class PointerSensor extends Sensor<DragDropManager, PointerSensorOptions
|
|
|
76
76
|
protected initialCoordinates: Coordinates | undefined;
|
|
77
77
|
protected controller: ActivationController<PointerEvent> | undefined;
|
|
78
78
|
constructor(manager: DragDropManager, options?: PointerSensorOptions | undefined);
|
|
79
|
-
protected activationConstraints(event: PointerEvent, source: Draggable): ActivationConstraints<PointerEvent> | undefined;
|
|
79
|
+
protected activationConstraints(event: PointerEvent, source: Draggable, options?: PointerSensorOptions | undefined): ActivationConstraints<PointerEvent> | undefined;
|
|
80
80
|
bind(source: Draggable, options?: PointerSensorOptions | undefined): () => void;
|
|
81
81
|
protected handlePointerDown(event: PointerEvent, source: Draggable, options: PointerSensorOptions | undefined): void;
|
|
82
82
|
private latest;
|
package/index.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ declare class PointerSensor extends Sensor<DragDropManager, PointerSensorOptions
|
|
|
76
76
|
protected initialCoordinates: Coordinates | undefined;
|
|
77
77
|
protected controller: ActivationController<PointerEvent> | undefined;
|
|
78
78
|
constructor(manager: DragDropManager, options?: PointerSensorOptions | undefined);
|
|
79
|
-
protected activationConstraints(event: PointerEvent, source: Draggable): ActivationConstraints<PointerEvent> | undefined;
|
|
79
|
+
protected activationConstraints(event: PointerEvent, source: Draggable, options?: PointerSensorOptions | undefined): ActivationConstraints<PointerEvent> | undefined;
|
|
80
80
|
bind(source: Draggable, options?: PointerSensorOptions | undefined): () => void;
|
|
81
81
|
protected handlePointerDown(event: PointerEvent, source: Draggable, options: PointerSensorOptions | undefined): void;
|
|
82
82
|
private latest;
|
package/index.js
CHANGED
|
@@ -1665,9 +1665,8 @@ var _PointerSensor = class _PointerSensor extends Sensor {
|
|
|
1665
1665
|
this.handlePointerUp = this.handlePointerUp.bind(this);
|
|
1666
1666
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
1667
1667
|
}
|
|
1668
|
-
activationConstraints(event, source) {
|
|
1669
|
-
|
|
1670
|
-
const { activationConstraints = defaults2.activationConstraints } = (_a4 = this.options) != null ? _a4 : {};
|
|
1668
|
+
activationConstraints(event, source, options = this.options) {
|
|
1669
|
+
const { activationConstraints = defaults2.activationConstraints } = options != null ? options : {};
|
|
1671
1670
|
const constraints = typeof activationConstraints === "function" ? activationConstraints(event, source) : activationConstraints;
|
|
1672
1671
|
return constraints;
|
|
1673
1672
|
}
|
|
@@ -1714,7 +1713,7 @@ var _PointerSensor = class _PointerSensor extends Sensor {
|
|
|
1714
1713
|
x: x * offset.scaleX + offset.x,
|
|
1715
1714
|
y: y * offset.scaleY + offset.y
|
|
1716
1715
|
};
|
|
1717
|
-
const constraints = this.activationConstraints(event, source);
|
|
1716
|
+
const constraints = this.activationConstraints(event, source, options);
|
|
1718
1717
|
event.sensor = this;
|
|
1719
1718
|
const controller = new ActivationController(
|
|
1720
1719
|
constraints,
|