@inweb/viewer-visualize 26.5.1 → 26.5.2
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
CHANGED
|
@@ -17086,7 +17086,7 @@
|
|
|
17086
17086
|
|
|
17087
17087
|
class KonvaEllipse {
|
|
17088
17088
|
constructor(params, ref = null, worldTransformer = new WorldTransform) {
|
|
17089
|
-
var _a, _b;
|
|
17089
|
+
var _a, _b, _c;
|
|
17090
17090
|
this._worldTransformer = worldTransformer;
|
|
17091
17091
|
if (ref) {
|
|
17092
17092
|
this._ref = ref;
|
|
@@ -17119,6 +17119,10 @@
|
|
|
17119
17119
|
y: 0
|
|
17120
17120
|
};
|
|
17121
17121
|
if (params.position2) {
|
|
17122
|
+
(_a = params.radius) !== null && _a !== undefined ? _a : params.radius = {
|
|
17123
|
+
x: 0,
|
|
17124
|
+
y: 0
|
|
17125
|
+
};
|
|
17122
17126
|
params.radius.x = getDistanceIn2D(params.position, params.position2);
|
|
17123
17127
|
if (params.position3) params.radius.y = getDistanceIn2D(params.position, params.position3); else params.radius.x = params.radius.y;
|
|
17124
17128
|
} else {
|
|
@@ -17128,8 +17132,8 @@
|
|
|
17128
17132
|
};
|
|
17129
17133
|
}
|
|
17130
17134
|
this._ref = new Konva.Ellipse({
|
|
17131
|
-
stroke: (
|
|
17132
|
-
strokeWidth: (
|
|
17135
|
+
stroke: (_b = params.color) !== null && _b !== undefined ? _b : "#ff0000",
|
|
17136
|
+
strokeWidth: (_c = params.lineWidth) !== null && _c !== undefined ? _c : 4,
|
|
17133
17137
|
globalCompositeOperation: "source-over",
|
|
17134
17138
|
lineCap: "round",
|
|
17135
17139
|
lineJoin: "round",
|
|
@@ -17565,13 +17569,13 @@
|
|
|
17565
17569
|
this._ref.width(params.maxHeight / this._ratio);
|
|
17566
17570
|
this._ref.height(params.maxHeight);
|
|
17567
17571
|
}
|
|
17568
|
-
const wcsEnd = this._worldTransformer.screenToWorld({
|
|
17569
|
-
x: params.position.x + this._ref.width(),
|
|
17570
|
-
y: params.position.y + this._ref.height()
|
|
17571
|
-
});
|
|
17572
|
-
this._ref.setAttr("wcsEnd", wcsEnd);
|
|
17573
17572
|
}
|
|
17574
17573
|
}
|
|
17574
|
+
const wcsEnd = this._worldTransformer.screenToWorld({
|
|
17575
|
+
x: params.position.x + this._ref.width(),
|
|
17576
|
+
y: params.position.y + this._ref.height()
|
|
17577
|
+
});
|
|
17578
|
+
this._ref.setAttr("wcsEnd", wcsEnd);
|
|
17575
17579
|
};
|
|
17576
17580
|
this._canvasImage.onerror = () => {
|
|
17577
17581
|
this._canvasImage.onerror = function() {};
|