@inweb/markup 26.7.1 → 26.7.6
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 +16 -16
- package/dist/markup.js.map +1 -1
- package/dist/markup.min.js +1 -1
- package/dist/markup.module.js +16 -16
- package/dist/markup.module.js.map +1 -1
- package/lib/markup/IMarkup.d.ts +2 -1
- package/lib/markup/IMarkupCloud.d.ts +1 -1
- package/lib/markup/IMarkupEllipse.d.ts +2 -2
- package/lib/markup/IMarkupImage.d.ts +1 -1
- package/lib/markup/IMarkupRectangle.d.ts +1 -1
- package/lib/markup/Konva/KonvaCloud.d.ts +1 -1
- package/lib/markup/Konva/KonvaMarkup.d.ts +3 -3
- package/lib/markup/Konva/KonvaRectangle.d.ts +1 -1
- package/package.json +3 -3
- package/src/markup/IMarkup.ts +2 -1
- package/src/markup/IMarkupCloud.ts +1 -1
- package/src/markup/IMarkupEllipse.ts +2 -2
- package/src/markup/IMarkupImage.ts +1 -1
- package/src/markup/IMarkupRectangle.ts +1 -1
- package/src/markup/Konva/KonvaCloud.ts +2 -2
- 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 +2 -2
- package/src/markup/Konva/KonvaText.ts +1 -1
package/dist/markup.js
CHANGED
|
@@ -12078,7 +12078,7 @@
|
|
|
12078
12078
|
if (attrs.rotation !== this._ref.rotation())
|
|
12079
12079
|
this._ref.rotation(attrs.rotation);
|
|
12080
12080
|
});
|
|
12081
|
-
this._ref.on("transformend", (
|
|
12081
|
+
this._ref.on("transformend", () => {
|
|
12082
12082
|
const absoluteTransform = this._ref.getAbsoluteTransform();
|
|
12083
12083
|
const wcsPoints = [];
|
|
12084
12084
|
const points = this._ref.points();
|
|
@@ -12090,7 +12090,7 @@
|
|
|
12090
12090
|
}
|
|
12091
12091
|
this._ref.setAttr("wcsPoints", wcsPoints);
|
|
12092
12092
|
});
|
|
12093
|
-
this._ref.on("dragend", (
|
|
12093
|
+
this._ref.on("dragend", () => {
|
|
12094
12094
|
const absoluteTransform = this._ref.getAbsoluteTransform();
|
|
12095
12095
|
const wcsPoints = [];
|
|
12096
12096
|
const points = this._ref.points();
|
|
@@ -12282,7 +12282,7 @@
|
|
|
12282
12282
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
12283
12283
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
12284
12284
|
});
|
|
12285
|
-
this._ref.on("dragend", (
|
|
12285
|
+
this._ref.on("dragend", () => {
|
|
12286
12286
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
12287
12287
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
12288
12288
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
@@ -12456,7 +12456,7 @@
|
|
|
12456
12456
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
12457
12457
|
this._ref.setAttr("wcsEnd", this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() }));
|
|
12458
12458
|
});
|
|
12459
|
-
this._ref.on("dragend", (
|
|
12459
|
+
this._ref.on("dragend", () => {
|
|
12460
12460
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
12461
12461
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
12462
12462
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
@@ -12470,7 +12470,7 @@
|
|
|
12470
12470
|
getWidth() {
|
|
12471
12471
|
return this._ref.width();
|
|
12472
12472
|
}
|
|
12473
|
-
|
|
12473
|
+
getHeight() {
|
|
12474
12474
|
return this._ref.height();
|
|
12475
12475
|
}
|
|
12476
12476
|
setWidth(w) {
|
|
@@ -12654,7 +12654,7 @@
|
|
|
12654
12654
|
}
|
|
12655
12655
|
this._ref.scale({ x: 1, y: 1 });
|
|
12656
12656
|
});
|
|
12657
|
-
this._ref.on("transformend", (
|
|
12657
|
+
this._ref.on("transformend", () => {
|
|
12658
12658
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
12659
12659
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
12660
12660
|
this._ref.setAttr("wcsPosition", this._worldTransformer.screenToWorld(position));
|
|
@@ -12663,7 +12663,7 @@
|
|
|
12663
12663
|
const radiusY = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() + this._ref.radiusY() });
|
|
12664
12664
|
this._ref.setAttr("wcsRadiusY", this._worldTransformer.screenToWorld(radiusY));
|
|
12665
12665
|
});
|
|
12666
|
-
this._ref.on("dragend", (
|
|
12666
|
+
this._ref.on("dragend", () => {
|
|
12667
12667
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
12668
12668
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
12669
12669
|
this._ref.setAttr("wcsPosition", this._worldTransformer.screenToWorld(position));
|
|
@@ -13047,13 +13047,13 @@
|
|
|
13047
13047
|
}
|
|
13048
13048
|
this._ref.scale({ x: 1, y: 1 });
|
|
13049
13049
|
});
|
|
13050
|
-
this._ref.on("transformend", (
|
|
13050
|
+
this._ref.on("transformend", () => {
|
|
13051
13051
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
13052
13052
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
13053
13053
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
13054
13054
|
this._ref.setAttr("wcsEnd", this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() }));
|
|
13055
13055
|
});
|
|
13056
|
-
this._ref.on("dragend", (
|
|
13056
|
+
this._ref.on("dragend", () => {
|
|
13057
13057
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
13058
13058
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
13059
13059
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
@@ -13311,7 +13311,7 @@
|
|
|
13311
13311
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
13312
13312
|
this._ref.setAttr("wcsEnd", this._worldTransformer.screenToWorld({ x: position.x + this._ref.width(), y: position.y + this._ref.height() }));
|
|
13313
13313
|
});
|
|
13314
|
-
this._ref.on("dragend", (
|
|
13314
|
+
this._ref.on("dragend", () => {
|
|
13315
13315
|
const absoluteTransform = this._ref.getStage().getAbsoluteTransform();
|
|
13316
13316
|
const position = absoluteTransform.point({ x: this._ref.x(), y: this._ref.y() });
|
|
13317
13317
|
this._ref.setAttr("wcsStart", this._worldTransformer.screenToWorld(position));
|
|
@@ -13380,7 +13380,7 @@
|
|
|
13380
13380
|
const wcsRightLowerPoint = this._worldTransformer.screenToWorld(rightLowerPoint);
|
|
13381
13381
|
this._ref.setAttr("wcsEnd", wcsRightLowerPoint);
|
|
13382
13382
|
}
|
|
13383
|
-
|
|
13383
|
+
getHeight() {
|
|
13384
13384
|
return this._ref.height();
|
|
13385
13385
|
}
|
|
13386
13386
|
setHeight(h) {
|
|
@@ -13524,12 +13524,12 @@
|
|
|
13524
13524
|
markupObject.updateScreenCoordinates();
|
|
13525
13525
|
});
|
|
13526
13526
|
};
|
|
13527
|
-
this.pan = (
|
|
13527
|
+
this.pan = () => {
|
|
13528
13528
|
this.getObjects().forEach((markupObject) => {
|
|
13529
13529
|
markupObject.updateScreenCoordinates();
|
|
13530
13530
|
});
|
|
13531
13531
|
};
|
|
13532
|
-
this.zoomAt = (
|
|
13532
|
+
this.zoomAt = () => {
|
|
13533
13533
|
this.getObjects().forEach((markupObject) => {
|
|
13534
13534
|
markupObject.updateScreenCoordinates();
|
|
13535
13535
|
});
|
|
@@ -13800,7 +13800,7 @@
|
|
|
13800
13800
|
lastLine = this.addLine([pos.x, pos.y, pos.x, pos.y]);
|
|
13801
13801
|
}
|
|
13802
13802
|
});
|
|
13803
|
-
stage.on("mouseup touchend", (
|
|
13803
|
+
stage.on("mouseup touchend", () => {
|
|
13804
13804
|
if (!this._markupIsActive)
|
|
13805
13805
|
return;
|
|
13806
13806
|
if (isPaint) {
|
|
@@ -13828,7 +13828,7 @@
|
|
|
13828
13828
|
lastObj = undefined;
|
|
13829
13829
|
isPaint = false;
|
|
13830
13830
|
});
|
|
13831
|
-
stage.on("mousemove touchmove", (
|
|
13831
|
+
stage.on("mousemove touchmove", () => {
|
|
13832
13832
|
if (!this._markupIsActive)
|
|
13833
13833
|
return;
|
|
13834
13834
|
if (!isPaint) {
|
|
@@ -14225,7 +14225,7 @@
|
|
|
14225
14225
|
const base64 = await convertBase64(file);
|
|
14226
14226
|
this.addImage({ x: this._imageInputPos.x, y: this._imageInputPos.y }, null, base64.toString(), 0, 0);
|
|
14227
14227
|
};
|
|
14228
|
-
this._imageInputRef.oncancel = (
|
|
14228
|
+
this._imageInputRef.oncancel = () => {
|
|
14229
14229
|
this.removeImageInput();
|
|
14230
14230
|
};
|
|
14231
14231
|
document.body.appendChild(this._imageInputRef);
|