@stemy/ngx-utils 19.4.7 → 19.4.10
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.
|
@@ -1734,7 +1734,7 @@ class Rect {
|
|
|
1734
1734
|
this.rotation = rotation;
|
|
1735
1735
|
}
|
|
1736
1736
|
distance(p) {
|
|
1737
|
-
p = p.rotateAround(this.center, -this.rotation);
|
|
1737
|
+
p = new Point(p.x, p.y).rotateAround(this.center, -this.rotation);
|
|
1738
1738
|
const x = Math.max(this.left - p.x, 0, p.x - this.right);
|
|
1739
1739
|
const y = Math.max(this.bottom - p.y, 0, p.y - this.top);
|
|
1740
1740
|
return Math.sqrt(x * x + y * y);
|
|
@@ -6904,9 +6904,9 @@ class InteractiveItemComponent {
|
|
|
6904
6904
|
this.pos = new Point(this.pos.x, value);
|
|
6905
6905
|
}
|
|
6906
6906
|
set position(value) {
|
|
6907
|
-
if (
|
|
6907
|
+
if (typeof value !== "object" || isNaN(value.x) || isNaN(value.y))
|
|
6908
6908
|
return;
|
|
6909
|
-
this.pos = value;
|
|
6909
|
+
this.pos = new Point(value.x, value.y);
|
|
6910
6910
|
}
|
|
6911
6911
|
get shapes() {
|
|
6912
6912
|
return this.mShapes;
|
|
@@ -7111,7 +7111,12 @@ class InteractiveCanvasComponent {
|
|
|
7111
7111
|
}
|
|
7112
7112
|
onPanStart($event) {
|
|
7113
7113
|
this.lockedItem = this.getItemUnderPointer($event?.pointers[0]);
|
|
7114
|
-
this.lockedItem?.onPanStart.emit(
|
|
7114
|
+
this.lockedItem?.onPanStart.emit({
|
|
7115
|
+
pointers: [],
|
|
7116
|
+
deltaX: 0,
|
|
7117
|
+
deltaY: 0,
|
|
7118
|
+
item: this.lockedItem
|
|
7119
|
+
});
|
|
7115
7120
|
this.panFrom = this.pan;
|
|
7116
7121
|
}
|
|
7117
7122
|
onPan($event) {
|
|
@@ -7128,7 +7133,12 @@ class InteractiveCanvasComponent {
|
|
|
7128
7133
|
// this.fixPan();
|
|
7129
7134
|
}
|
|
7130
7135
|
onPanEnd() {
|
|
7131
|
-
this.lockedItem?.onPanEnd.emit(
|
|
7136
|
+
this.lockedItem?.onPanEnd.emit({
|
|
7137
|
+
pointers: [],
|
|
7138
|
+
deltaX: 0,
|
|
7139
|
+
deltaY: 0,
|
|
7140
|
+
item: this.lockedItem
|
|
7141
|
+
});
|
|
7132
7142
|
this.lockedItem = null;
|
|
7133
7143
|
this.panFrom = this.pan;
|
|
7134
7144
|
}
|