@inweb/markup 26.6.0 → 26.6.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.
@@ -63,7 +63,7 @@ class KonvaLine {
63
63
  let wcsPoints = this._ref.getAttr("wcsPoints");
64
64
  if (!wcsPoints) {
65
65
  wcsPoints = [];
66
- let points = this._ref.points();
66
+ const points = this._ref.points();
67
67
  let wcsPoint;
68
68
  for (let i = 0; i < points.length; i += 2) {
69
69
  wcsPoint = this._worldTransformer.screenToWorld({
@@ -92,7 +92,7 @@ class KonvaLine {
92
92
  const wcsPoints = [];
93
93
  params.points.forEach((point => {
94
94
  konvaPoints.push(point.x, point.y);
95
- let wcsPoint = this._worldTransformer.screenToWorld({
95
+ const wcsPoint = this._worldTransformer.screenToWorld({
96
96
  x: point.x,
97
97
  y: point.y
98
98
  });
@@ -120,8 +120,8 @@ class KonvaLine {
120
120
  }));
121
121
  this._ref.on("transformend", (e => {
122
122
  const absoluteTransform = this._ref.getAbsoluteTransform();
123
- let wcsPoints = [];
124
- let points = this._ref.points();
123
+ const wcsPoints = [];
124
+ const points = this._ref.points();
125
125
  let wcsPoint;
126
126
  for (let i = 0; i < points.length; i += 2) {
127
127
  const position = absoluteTransform.point({
@@ -142,8 +142,8 @@ class KonvaLine {
142
142
  }));
143
143
  this._ref.on("dragend", (e => {
144
144
  const absoluteTransform = this._ref.getAbsoluteTransform();
145
- let wcsPoints = [];
146
- let points = this._ref.points();
145
+ const wcsPoints = [];
146
+ const points = this._ref.points();
147
147
  let wcsPoint;
148
148
  for (let i = 0; i < points.length; i += 2) {
149
149
  const position = absoluteTransform.point({
@@ -231,17 +231,17 @@ class KonvaLine {
231
231
  }
232
232
  addPoints(points) {
233
233
  let newPoints = this._ref.points();
234
- let wcsPoints = this._ref.getAttr("wcsPoints");
234
+ const wcsPoints = this._ref.getAttr("wcsPoints");
235
235
  points.forEach((point => {
236
236
  newPoints = newPoints.concat([ point.x, point.y ]);
237
- let wcsPoint = this._worldTransformer.screenToWorld(point);
237
+ const wcsPoint = this._worldTransformer.screenToWorld(point);
238
238
  wcsPoints.push(wcsPoint);
239
239
  }));
240
240
  this._ref.points(newPoints);
241
241
  }
242
242
  updateScreenCoordinates() {
243
- let wcsPoints = this._ref.getAttr("wcsPoints");
244
- let points = [];
243
+ const wcsPoints = this._ref.getAttr("wcsPoints");
244
+ const points = [];
245
245
  let invert = this._ref.getAbsoluteTransform().copy();
246
246
  invert = invert.invert();
247
247
  wcsPoints.forEach((point => {
@@ -400,7 +400,7 @@ class KonvaText {
400
400
  this._ref.fontSize(size);
401
401
  }
402
402
  updateScreenCoordinates() {
403
- let screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
403
+ const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
404
404
  let invert = this._ref.getStage().getAbsoluteTransform().copy();
405
405
  invert = invert.invert();
406
406
  const positionStart = invert.point(screenPositionStart);
@@ -616,8 +616,8 @@ class KonvaRectangle {
616
616
  return this._ref.strokeWidth();
617
617
  }
618
618
  updateScreenCoordinates() {
619
- let screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
620
- let screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
619
+ const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
620
+ const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
621
621
  let invert = this._ref.getStage().getAbsoluteTransform().copy();
622
622
  invert = invert.invert();
623
623
  const positionStart = invert.point(screenPositionStart);
@@ -855,9 +855,9 @@ class KonvaEllipse {
855
855
  this._ref = null;
856
856
  }
857
857
  updateScreenCoordinates() {
858
- let screenPosition = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsPosition"));
859
- let radiusX = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsRadiusX"));
860
- let radiusY = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsRadiusY"));
858
+ const screenPosition = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsPosition"));
859
+ const radiusX = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsRadiusX"));
860
+ const radiusY = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsRadiusY"));
861
861
  let invert = this._ref.getStage().getAbsoluteTransform().copy();
862
862
  invert = invert.invert();
863
863
  const position = invert.point({
@@ -1042,8 +1042,8 @@ class KonvaArrow {
1042
1042
  }));
1043
1043
  }
1044
1044
  updateScreenCoordinates() {
1045
- let screenStartPoint = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
1046
- let screenEndPoint = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
1045
+ const screenStartPoint = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
1046
+ const screenEndPoint = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
1047
1047
  let invert = this._ref.getAbsoluteTransform().copy();
1048
1048
  invert = invert.invert();
1049
1049
  const startPoint = invert.point({
@@ -1281,8 +1281,8 @@ class KonvaImage {
1281
1281
  this._ref.setAttr("wcsEnd", wcsRightLowerPoint);
1282
1282
  }
1283
1283
  updateScreenCoordinates() {
1284
- let screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
1285
- let screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
1284
+ const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
1285
+ const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
1286
1286
  let invert = this._ref.getStage().getAbsoluteTransform().copy();
1287
1287
  invert = invert.invert();
1288
1288
  const positionStart = invert.point(screenPositionStart);
@@ -1580,8 +1580,8 @@ class KonvaCloud {
1580
1580
  this._ref.strokeWidth(size);
1581
1581
  }
1582
1582
  updateScreenCoordinates() {
1583
- let screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
1584
- let screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
1583
+ const screenPositionStart = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsStart"));
1584
+ const screenPositionEnd = this._worldTransformer.worldToScreen(this._ref.getAttr("wcsEnd"));
1585
1585
  let invert = this._ref.getStage().getAbsoluteTransform().copy();
1586
1586
  invert = invert.invert();
1587
1587
  const positionStart = invert.point(screenPositionStart);