@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.cjs
CHANGED
|
@@ -1667,9 +1667,8 @@ var _PointerSensor = class _PointerSensor extends abstract.Sensor {
|
|
|
1667
1667
|
this.handlePointerUp = this.handlePointerUp.bind(this);
|
|
1668
1668
|
this.handleKeyDown = this.handleKeyDown.bind(this);
|
|
1669
1669
|
}
|
|
1670
|
-
activationConstraints(event, source) {
|
|
1671
|
-
|
|
1672
|
-
const { activationConstraints = defaults2.activationConstraints } = (_a4 = this.options) != null ? _a4 : {};
|
|
1670
|
+
activationConstraints(event, source, options = this.options) {
|
|
1671
|
+
const { activationConstraints = defaults2.activationConstraints } = options != null ? options : {};
|
|
1673
1672
|
const constraints = typeof activationConstraints === "function" ? activationConstraints(event, source) : activationConstraints;
|
|
1674
1673
|
return constraints;
|
|
1675
1674
|
}
|
|
@@ -1716,7 +1715,7 @@ var _PointerSensor = class _PointerSensor extends abstract.Sensor {
|
|
|
1716
1715
|
x: x * offset.scaleX + offset.x,
|
|
1717
1716
|
y: y * offset.scaleY + offset.y
|
|
1718
1717
|
};
|
|
1719
|
-
const constraints = this.activationConstraints(event, source);
|
|
1718
|
+
const constraints = this.activationConstraints(event, source, options);
|
|
1720
1719
|
event.sensor = this;
|
|
1721
1720
|
const controller = new abstract.ActivationController(
|
|
1722
1721
|
constraints,
|