@inweb/markup 26.5.0 → 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/markup.js CHANGED
@@ -12573,7 +12573,7 @@
12573
12573
  ///////////////////////////////////////////////////////////////////////////////
12574
12574
  class KonvaEllipse {
12575
12575
  constructor(params, ref = null, worldTransformer = new WorldTransform()) {
12576
- var _a, _b;
12576
+ var _a, _b, _c;
12577
12577
  this._worldTransformer = worldTransformer;
12578
12578
  if (ref) {
12579
12579
  this._ref = ref;
@@ -12596,6 +12596,7 @@
12596
12596
  if (!params.position)
12597
12597
  params.position = { x: 0, y: 0 };
12598
12598
  if (params.position2) {
12599
+ (_a = params.radius) !== null && _a !== undefined ? _a : (params.radius = { x: 0, y: 0 });
12599
12600
  params.radius.x = getDistanceIn2D(params.position, params.position2);
12600
12601
  if (params.position3)
12601
12602
  params.radius.y = getDistanceIn2D(params.position, params.position3);
@@ -12607,8 +12608,8 @@
12607
12608
  params.radius = { x: 25, y: 25 };
12608
12609
  }
12609
12610
  this._ref = new Konva.Ellipse({
12610
- stroke: (_a = params.color) !== null && _a !== undefined ? _a : "#ff0000",
12611
- strokeWidth: (_b = params.lineWidth) !== null && _b !== undefined ? _b : 4,
12611
+ stroke: (_b = params.color) !== null && _b !== undefined ? _b : "#ff0000",
12612
+ strokeWidth: (_c = params.lineWidth) !== null && _c !== undefined ? _c : 4,
12612
12613
  globalCompositeOperation: "source-over",
12613
12614
  lineCap: "round",
12614
12615
  lineJoin: "round",
@@ -12992,13 +12993,13 @@
12992
12993
  this._ref.width(params.maxHeight / this._ratio);
12993
12994
  this._ref.height(params.maxHeight);
12994
12995
  }
12995
- const wcsEnd = this._worldTransformer.screenToWorld({
12996
- x: params.position.x + this._ref.width(),
12997
- y: params.position.y + this._ref.height(),
12998
- });
12999
- this._ref.setAttr("wcsEnd", wcsEnd);
13000
12996
  }
13001
12997
  }
12998
+ const wcsEnd = this._worldTransformer.screenToWorld({
12999
+ x: params.position.x + this._ref.width(),
13000
+ y: params.position.y + this._ref.height(),
13001
+ });
13002
+ this._ref.setAttr("wcsEnd", wcsEnd);
13002
13003
  };
13003
13004
  this._canvasImage.onerror = () => {
13004
13005
  this._canvasImage.onerror = function () { };