@inweb/markup 26.10.1 → 26.10.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/markup",
|
|
3
|
-
"version": "26.10.
|
|
3
|
+
"version": "26.10.3",
|
|
4
4
|
"description": "JavaScript 2D markups",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"docs": "typedoc"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@inweb/eventemitter2": "~26.10.
|
|
30
|
-
"@inweb/viewer-core": "~26.10.
|
|
29
|
+
"@inweb/eventemitter2": "~26.10.3",
|
|
30
|
+
"@inweb/viewer-core": "~26.10.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"konva": "^9.3.18"
|
|
@@ -145,16 +145,18 @@ export class KonvaMarkup implements IMarkup {
|
|
|
145
145
|
this._markupContainer = document.createElement("div");
|
|
146
146
|
this._markupContainer.id = "markup-container";
|
|
147
147
|
this._markupContainer.style.position = "absolute";
|
|
148
|
-
this._markupContainer.style.top = "0px";
|
|
149
|
-
this._markupContainer.style.left = "0px";
|
|
150
148
|
this._markupContainer.style.outline = "0px"; // <- to eliminate grey box during delete elements
|
|
151
149
|
this._markupContainer.style.pointerEvents = "none";
|
|
152
150
|
|
|
153
151
|
const parentDiv = this._container.parentElement;
|
|
154
152
|
parentDiv.appendChild(this._markupContainer);
|
|
155
153
|
|
|
156
|
-
if (viewer)
|
|
157
|
-
|
|
154
|
+
if (viewer) {
|
|
155
|
+
this._viewer.addEventListener("resize", this.resizeViewer);
|
|
156
|
+
} else {
|
|
157
|
+
this._resizeObserver = new ResizeObserver(debounce(this.resizeContainer, 100));
|
|
158
|
+
this._resizeObserver.observe(parentDiv);
|
|
159
|
+
}
|
|
158
160
|
|
|
159
161
|
this._markupColor.setColor(255, 0, 0);
|
|
160
162
|
|