@inweb/viewer-visualize 25.4.10 → 25.4.11
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/viewer-visualize.js +22 -27
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +20 -25
- package/dist/viewer-visualize.module.js.map +1 -1
- package/package.json +5 -5
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaText.ts +2 -4
- package/src/Viewer/Markup/Impl/Konva/KonvaMarkup.ts +22 -26
package/dist/viewer-visualize.js
CHANGED
|
@@ -14689,7 +14689,6 @@
|
|
|
14689
14689
|
draggable: true,
|
|
14690
14690
|
rotation: (_c = params.rotation) !== null && _c !== void 0 ? _c : 0,
|
|
14691
14691
|
});
|
|
14692
|
-
this._ref.width(this._ref.getTextWidth());
|
|
14693
14692
|
this._ref.on("transform", (e) => {
|
|
14694
14693
|
const attrs = e.target.attrs;
|
|
14695
14694
|
if (attrs.rotation !== this.getRotation())
|
|
@@ -14697,10 +14696,10 @@
|
|
|
14697
14696
|
const newWidth = this._ref.width() * attrs.scaleX;
|
|
14698
14697
|
const newHeight = this._ref.height() * attrs.scaleY;
|
|
14699
14698
|
if (Math.abs(attrs.scaleX - 1) > 10e-6) {
|
|
14700
|
-
this._ref.width(
|
|
14699
|
+
this.setFontSize(Math.round((this.getFontSize() * newWidth) / this._ref.width()));
|
|
14701
14700
|
}
|
|
14702
14701
|
if (Math.abs(attrs.scaleY - 1) > 10e-6) {
|
|
14703
|
-
this._ref.height(
|
|
14702
|
+
this.setFontSize(Math.round((this.getFontSize() * newHeight) / this._ref.height()));
|
|
14704
14703
|
}
|
|
14705
14704
|
this._ref.scale({ x: 1, y: 1 });
|
|
14706
14705
|
});
|
|
@@ -15823,29 +15822,25 @@
|
|
|
15823
15822
|
transformer.nodes([]);
|
|
15824
15823
|
return;
|
|
15825
15824
|
}
|
|
15826
|
-
if (
|
|
15827
|
-
if (
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
return;
|
|
15833
|
-
}
|
|
15834
|
-
else {
|
|
15835
|
-
this.removeTextInput();
|
|
15836
|
-
}
|
|
15825
|
+
if (e.target.className === "Text" && transformer.nodes().length === 1 && transformer.nodes()[0] === e.target) {
|
|
15826
|
+
if (this._textInputRef && this._textInputRef.value)
|
|
15827
|
+
this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);
|
|
15828
|
+
else
|
|
15829
|
+
this.createTextInput({ x: e.target.attrs.x, y: e.target.attrs.y }, e.evt.pageX, e.evt.pageY, e.target.attrs.rotation, e.target.attrs.text);
|
|
15830
|
+
return;
|
|
15837
15831
|
}
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15841
|
-
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
|
|
15845
|
-
|
|
15846
|
-
|
|
15847
|
-
|
|
15848
|
-
|
|
15832
|
+
else {
|
|
15833
|
+
this.removeTextInput();
|
|
15834
|
+
}
|
|
15835
|
+
if (e.target.className === "Image" && transformer.nodes().length === 1 && transformer.nodes()[0] === e.target) {
|
|
15836
|
+
if (this._imageInputRef && this._imageInputRef.value)
|
|
15837
|
+
this.addImage(this._imageInputPos, this._imageInputRef.value, 0, 0);
|
|
15838
|
+
else
|
|
15839
|
+
this.createImageInput({ x: e.target.attrs.x, y: e.target.attrs.y });
|
|
15840
|
+
return;
|
|
15841
|
+
}
|
|
15842
|
+
else {
|
|
15843
|
+
this.removeImageInput();
|
|
15849
15844
|
}
|
|
15850
15845
|
if (transformer.nodes().filter((x) => x.className === "Cloud").length > 0 || e.target.className === "Cloud") {
|
|
15851
15846
|
transformer.rotateEnabled(false);
|
|
@@ -16135,7 +16130,7 @@
|
|
|
16135
16130
|
this._textInputRef.style.top = inputY + "px";
|
|
16136
16131
|
this._textInputRef.style.left = inputX + "px";
|
|
16137
16132
|
this._textInputRef.onkeydown = (event) => {
|
|
16138
|
-
if (event.key === "Enter"
|
|
16133
|
+
if (event.key === "Enter") {
|
|
16139
16134
|
event.preventDefault();
|
|
16140
16135
|
this.addText(this._textInputRef.value, this._textInputPos, this._textInputAngle);
|
|
16141
16136
|
}
|
|
@@ -16729,7 +16724,7 @@
|
|
|
16729
16724
|
* library instance or leave it blank to use the default URL defined by `Client.js`.
|
|
16730
16725
|
*/
|
|
16731
16726
|
configure(params) {
|
|
16732
|
-
this._visualizeJsUrl = params.visualizeJsUrl || "https://opencloud.azureedge.net/libs/visualizejs/
|
|
16727
|
+
this._visualizeJsUrl = params.visualizeJsUrl || "https://opencloud.azureedge.net/libs/visualizejs/25.4/Visualize.js";
|
|
16733
16728
|
return this;
|
|
16734
16729
|
}
|
|
16735
16730
|
/**
|