@inweb/markup 26.7.2 → 26.8.0
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/dist/markup.js +14 -14
- package/dist/markup.js.map +1 -1
- package/dist/markup.min.js +1 -1
- package/dist/markup.module.js +14 -14
- package/dist/markup.module.js.map +1 -1
- package/lib/markup/IMarkup.d.ts +2 -1
- package/lib/markup/Konva/KonvaMarkup.d.ts +3 -3
- package/package.json +3 -3
- package/src/markup/IMarkup.ts +2 -1
- package/src/markup/Konva/KonvaCloud.ts +1 -1
- package/src/markup/Konva/KonvaEllipse.ts +2 -2
- package/src/markup/Konva/KonvaImage.ts +2 -2
- package/src/markup/Konva/KonvaLine.ts +2 -2
- package/src/markup/Konva/KonvaMarkup.ts +5 -7
- package/src/markup/Konva/KonvaRectangle.ts +1 -1
- package/src/markup/Konva/KonvaText.ts +1 -1
package/dist/markup.module.js
CHANGED
|
@@ -118,7 +118,7 @@ class KonvaLine {
|
|
|
118
118
|
const attrs = e.target.attrs;
|
|
119
119
|
if (attrs.rotation !== this._ref.rotation()) this._ref.rotation(attrs.rotation);
|
|
120
120
|
}));
|
|
121
|
-
this._ref.on("transformend", (
|
|
121
|
+
this._ref.on("transformend", (() => {
|
|
122
122
|
const absoluteTransform = this._ref.getAbsoluteTransform();
|
|
123
123
|
const wcsPoints = [];
|
|
124
124
|
const points = this._ref.points();
|
|
@@ -140,7 +140,7 @@ class KonvaLine {
|
|
|
140
140
|
}
|
|
141
141
|
this._ref.setAttr("wcsPoints", wcsPoints);
|
|
142
142
|
}));
|
|
143
|
-
this._ref.on("dragend", (
|
|
143
|
+
this._ref.on("dragend", (() => {
|
|
144
144
|
const absoluteTransform = this._ref.getAbsoluteTransform();
|
|
145
145
|
const wcsPoints = [];
|
|
146
146
|
const points = this._ref.points();
|
|
@@ -330,7 +330,7 @@ class KonvaText {
|
|
|
330
330
|
});
|
|
331
331
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
332
332
|
}));
|
|
333
|
-
this._ref.on("dragend", (
|
|
333
|
+
this._ref.on("dragend", (() => {
|
|
334
334
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
335
335
|
const position = absoluteTransform.point({
|
|
336
336
|
x: this._ref.x(),
|
|
@@ -518,7 +518,7 @@ class KonvaRectangle {
|
|
|
518
518
|
y: position.y + this._ref.height()
|
|
519
519
|
}));
|
|
520
520
|
}));
|
|
521
|
-
this._ref.on("dragend", (
|
|
521
|
+
this._ref.on("dragend", (() => {
|
|
522
522
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
523
523
|
const position = absoluteTransform.point({
|
|
524
524
|
x: this._ref.x(),
|
|
@@ -743,7 +743,7 @@ class KonvaEllipse {
|
|
|
743
743
|
y: 1
|
|
744
744
|
});
|
|
745
745
|
}));
|
|
746
|
-
this._ref.on("transformend", (
|
|
746
|
+
this._ref.on("transformend", (() => {
|
|
747
747
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
748
748
|
const position = absoluteTransform.point({
|
|
749
749
|
x: this._ref.x(),
|
|
@@ -761,7 +761,7 @@ class KonvaEllipse {
|
|
|
761
761
|
});
|
|
762
762
|
this._ref.setAttr("wcsRadiusY", this._worldTransformer.screenToWorld(radiusY));
|
|
763
763
|
}));
|
|
764
|
-
this._ref.on("dragend", (
|
|
764
|
+
this._ref.on("dragend", (() => {
|
|
765
765
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
766
766
|
const position = absoluteTransform.point({
|
|
767
767
|
x: this._ref.x(),
|
|
@@ -1175,7 +1175,7 @@ class KonvaImage {
|
|
|
1175
1175
|
y: 1
|
|
1176
1176
|
});
|
|
1177
1177
|
}));
|
|
1178
|
-
this._ref.on("transformend", (
|
|
1178
|
+
this._ref.on("transformend", (() => {
|
|
1179
1179
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
1180
1180
|
const position = absoluteTransform.point({
|
|
1181
1181
|
x: this._ref.x(),
|
|
@@ -1187,7 +1187,7 @@ class KonvaImage {
|
|
|
1187
1187
|
y: position.y + this._ref.height()
|
|
1188
1188
|
}));
|
|
1189
1189
|
}));
|
|
1190
|
-
this._ref.on("dragend", (
|
|
1190
|
+
this._ref.on("dragend", (() => {
|
|
1191
1191
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
1192
1192
|
const position = absoluteTransform.point({
|
|
1193
1193
|
x: this._ref.x(),
|
|
@@ -1476,7 +1476,7 @@ class KonvaCloud {
|
|
|
1476
1476
|
y: position.y + this._ref.height()
|
|
1477
1477
|
}));
|
|
1478
1478
|
}));
|
|
1479
|
-
this._ref.on("dragend", (
|
|
1479
|
+
this._ref.on("dragend", (() => {
|
|
1480
1480
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
1481
1481
|
const position = absoluteTransform.point({
|
|
1482
1482
|
x: this._ref.x(),
|
|
@@ -1678,12 +1678,12 @@ class KonvaMarkup {
|
|
|
1678
1678
|
markupObject.updateScreenCoordinates();
|
|
1679
1679
|
}));
|
|
1680
1680
|
};
|
|
1681
|
-
this.pan =
|
|
1681
|
+
this.pan = () => {
|
|
1682
1682
|
this.getObjects().forEach((markupObject => {
|
|
1683
1683
|
markupObject.updateScreenCoordinates();
|
|
1684
1684
|
}));
|
|
1685
1685
|
};
|
|
1686
|
-
this.zoomAt =
|
|
1686
|
+
this.zoomAt = () => {
|
|
1687
1687
|
this.getObjects().forEach((markupObject => {
|
|
1688
1688
|
markupObject.updateScreenCoordinates();
|
|
1689
1689
|
}));
|
|
@@ -1946,7 +1946,7 @@ class KonvaMarkup {
|
|
|
1946
1946
|
lastLine = this.addLine([ pos.x, pos.y, pos.x, pos.y ]);
|
|
1947
1947
|
}
|
|
1948
1948
|
}));
|
|
1949
|
-
stage.on("mouseup touchend", (
|
|
1949
|
+
stage.on("mouseup touchend", (() => {
|
|
1950
1950
|
if (!this._markupIsActive) return;
|
|
1951
1951
|
if (isPaint) {
|
|
1952
1952
|
const pos = this.getRelativePointerPosition(stage);
|
|
@@ -1988,7 +1988,7 @@ class KonvaMarkup {
|
|
|
1988
1988
|
lastObj = undefined;
|
|
1989
1989
|
isPaint = false;
|
|
1990
1990
|
}));
|
|
1991
|
-
stage.on("mousemove touchmove", (
|
|
1991
|
+
stage.on("mousemove touchmove", (() => {
|
|
1992
1992
|
if (!this._markupIsActive) return;
|
|
1993
1993
|
if (!isPaint) {
|
|
1994
1994
|
return;
|
|
@@ -2368,7 +2368,7 @@ class KonvaMarkup {
|
|
|
2368
2368
|
y: this._imageInputPos.y
|
|
2369
2369
|
}, null, base64.toString(), 0, 0);
|
|
2370
2370
|
};
|
|
2371
|
-
this._imageInputRef.oncancel =
|
|
2371
|
+
this._imageInputRef.oncancel = () => {
|
|
2372
2372
|
this.removeImageInput();
|
|
2373
2373
|
};
|
|
2374
2374
|
document.body.appendChild(this._imageInputRef);
|