microboard-temp 0.11.6 → 0.11.7
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/cjs/browser.js +16 -9
- package/dist/cjs/index.js +16 -9
- package/dist/cjs/node.js +16 -9
- package/dist/esm/browser.js +16 -9
- package/dist/esm/index.js +16 -9
- package/dist/esm/node.js +16 -9
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -40482,17 +40482,24 @@ class Sticker extends BaseItem {
|
|
|
40482
40482
|
this.transformPath();
|
|
40483
40483
|
if (op.method === "applyMatrix") {
|
|
40484
40484
|
const itemOp = op.items.find((i) => i.id === this.id);
|
|
40485
|
-
if (itemOp
|
|
40486
|
-
|
|
40487
|
-
|
|
40488
|
-
|
|
40485
|
+
if (itemOp) {
|
|
40486
|
+
const prevScaleX = this.transformation.previous.scaleX;
|
|
40487
|
+
const prevScaleY = this.transformation.previous.scaleY;
|
|
40488
|
+
const currentScaleX = this.transformation.getScale().x;
|
|
40489
|
+
const currentScaleY = this.transformation.getScale().y;
|
|
40490
|
+
const scaleChanged = Math.abs(currentScaleX - prevScaleX) > 0.0001 || Math.abs(currentScaleY - prevScaleY) > 0.0001;
|
|
40491
|
+
if (scaleChanged) {
|
|
40492
|
+
if (this.text.isAutosize()) {
|
|
40493
|
+
if (Math.abs(currentScaleX - currentScaleY) > 0.0001) {
|
|
40494
|
+
this.text.applyAutoSizeScale(this.text.calcAutoSize());
|
|
40495
|
+
} else {
|
|
40496
|
+
this.text.scaleAutoSizeScale(currentScaleX / prevScaleX);
|
|
40497
|
+
}
|
|
40498
|
+
this.text.recoordinate();
|
|
40499
|
+
this.text.transformCanvas();
|
|
40489
40500
|
} else {
|
|
40490
|
-
this.text.
|
|
40501
|
+
this.text.handleInshapeScale();
|
|
40491
40502
|
}
|
|
40492
|
-
this.text.recoordinate();
|
|
40493
|
-
this.text.transformCanvas();
|
|
40494
|
-
} else {
|
|
40495
|
-
this.text.handleInshapeScale();
|
|
40496
40503
|
}
|
|
40497
40504
|
}
|
|
40498
40505
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -40482,17 +40482,24 @@ class Sticker extends BaseItem {
|
|
|
40482
40482
|
this.transformPath();
|
|
40483
40483
|
if (op.method === "applyMatrix") {
|
|
40484
40484
|
const itemOp = op.items.find((i) => i.id === this.id);
|
|
40485
|
-
if (itemOp
|
|
40486
|
-
|
|
40487
|
-
|
|
40488
|
-
|
|
40485
|
+
if (itemOp) {
|
|
40486
|
+
const prevScaleX = this.transformation.previous.scaleX;
|
|
40487
|
+
const prevScaleY = this.transformation.previous.scaleY;
|
|
40488
|
+
const currentScaleX = this.transformation.getScale().x;
|
|
40489
|
+
const currentScaleY = this.transformation.getScale().y;
|
|
40490
|
+
const scaleChanged = Math.abs(currentScaleX - prevScaleX) > 0.0001 || Math.abs(currentScaleY - prevScaleY) > 0.0001;
|
|
40491
|
+
if (scaleChanged) {
|
|
40492
|
+
if (this.text.isAutosize()) {
|
|
40493
|
+
if (Math.abs(currentScaleX - currentScaleY) > 0.0001) {
|
|
40494
|
+
this.text.applyAutoSizeScale(this.text.calcAutoSize());
|
|
40495
|
+
} else {
|
|
40496
|
+
this.text.scaleAutoSizeScale(currentScaleX / prevScaleX);
|
|
40497
|
+
}
|
|
40498
|
+
this.text.recoordinate();
|
|
40499
|
+
this.text.transformCanvas();
|
|
40489
40500
|
} else {
|
|
40490
|
-
this.text.
|
|
40501
|
+
this.text.handleInshapeScale();
|
|
40491
40502
|
}
|
|
40492
|
-
this.text.recoordinate();
|
|
40493
|
-
this.text.transformCanvas();
|
|
40494
|
-
} else {
|
|
40495
|
-
this.text.handleInshapeScale();
|
|
40496
40503
|
}
|
|
40497
40504
|
}
|
|
40498
40505
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -42955,17 +42955,24 @@ class Sticker extends BaseItem {
|
|
|
42955
42955
|
this.transformPath();
|
|
42956
42956
|
if (op.method === "applyMatrix") {
|
|
42957
42957
|
const itemOp = op.items.find((i) => i.id === this.id);
|
|
42958
|
-
if (itemOp
|
|
42959
|
-
|
|
42960
|
-
|
|
42961
|
-
|
|
42958
|
+
if (itemOp) {
|
|
42959
|
+
const prevScaleX = this.transformation.previous.scaleX;
|
|
42960
|
+
const prevScaleY = this.transformation.previous.scaleY;
|
|
42961
|
+
const currentScaleX = this.transformation.getScale().x;
|
|
42962
|
+
const currentScaleY = this.transformation.getScale().y;
|
|
42963
|
+
const scaleChanged = Math.abs(currentScaleX - prevScaleX) > 0.0001 || Math.abs(currentScaleY - prevScaleY) > 0.0001;
|
|
42964
|
+
if (scaleChanged) {
|
|
42965
|
+
if (this.text.isAutosize()) {
|
|
42966
|
+
if (Math.abs(currentScaleX - currentScaleY) > 0.0001) {
|
|
42967
|
+
this.text.applyAutoSizeScale(this.text.calcAutoSize());
|
|
42968
|
+
} else {
|
|
42969
|
+
this.text.scaleAutoSizeScale(currentScaleX / prevScaleX);
|
|
42970
|
+
}
|
|
42971
|
+
this.text.recoordinate();
|
|
42972
|
+
this.text.transformCanvas();
|
|
42962
42973
|
} else {
|
|
42963
|
-
this.text.
|
|
42974
|
+
this.text.handleInshapeScale();
|
|
42964
42975
|
}
|
|
42965
|
-
this.text.recoordinate();
|
|
42966
|
-
this.text.transformCanvas();
|
|
42967
|
-
} else {
|
|
42968
|
-
this.text.handleInshapeScale();
|
|
42969
42976
|
}
|
|
42970
42977
|
}
|
|
42971
42978
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -40311,17 +40311,24 @@ class Sticker extends BaseItem {
|
|
|
40311
40311
|
this.transformPath();
|
|
40312
40312
|
if (op.method === "applyMatrix") {
|
|
40313
40313
|
const itemOp = op.items.find((i) => i.id === this.id);
|
|
40314
|
-
if (itemOp
|
|
40315
|
-
|
|
40316
|
-
|
|
40317
|
-
|
|
40314
|
+
if (itemOp) {
|
|
40315
|
+
const prevScaleX = this.transformation.previous.scaleX;
|
|
40316
|
+
const prevScaleY = this.transformation.previous.scaleY;
|
|
40317
|
+
const currentScaleX = this.transformation.getScale().x;
|
|
40318
|
+
const currentScaleY = this.transformation.getScale().y;
|
|
40319
|
+
const scaleChanged = Math.abs(currentScaleX - prevScaleX) > 0.0001 || Math.abs(currentScaleY - prevScaleY) > 0.0001;
|
|
40320
|
+
if (scaleChanged) {
|
|
40321
|
+
if (this.text.isAutosize()) {
|
|
40322
|
+
if (Math.abs(currentScaleX - currentScaleY) > 0.0001) {
|
|
40323
|
+
this.text.applyAutoSizeScale(this.text.calcAutoSize());
|
|
40324
|
+
} else {
|
|
40325
|
+
this.text.scaleAutoSizeScale(currentScaleX / prevScaleX);
|
|
40326
|
+
}
|
|
40327
|
+
this.text.recoordinate();
|
|
40328
|
+
this.text.transformCanvas();
|
|
40318
40329
|
} else {
|
|
40319
|
-
this.text.
|
|
40330
|
+
this.text.handleInshapeScale();
|
|
40320
40331
|
}
|
|
40321
|
-
this.text.recoordinate();
|
|
40322
|
-
this.text.transformCanvas();
|
|
40323
|
-
} else {
|
|
40324
|
-
this.text.handleInshapeScale();
|
|
40325
40332
|
}
|
|
40326
40333
|
}
|
|
40327
40334
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -40304,17 +40304,24 @@ class Sticker extends BaseItem {
|
|
|
40304
40304
|
this.transformPath();
|
|
40305
40305
|
if (op.method === "applyMatrix") {
|
|
40306
40306
|
const itemOp = op.items.find((i) => i.id === this.id);
|
|
40307
|
-
if (itemOp
|
|
40308
|
-
|
|
40309
|
-
|
|
40310
|
-
|
|
40307
|
+
if (itemOp) {
|
|
40308
|
+
const prevScaleX = this.transformation.previous.scaleX;
|
|
40309
|
+
const prevScaleY = this.transformation.previous.scaleY;
|
|
40310
|
+
const currentScaleX = this.transformation.getScale().x;
|
|
40311
|
+
const currentScaleY = this.transformation.getScale().y;
|
|
40312
|
+
const scaleChanged = Math.abs(currentScaleX - prevScaleX) > 0.0001 || Math.abs(currentScaleY - prevScaleY) > 0.0001;
|
|
40313
|
+
if (scaleChanged) {
|
|
40314
|
+
if (this.text.isAutosize()) {
|
|
40315
|
+
if (Math.abs(currentScaleX - currentScaleY) > 0.0001) {
|
|
40316
|
+
this.text.applyAutoSizeScale(this.text.calcAutoSize());
|
|
40317
|
+
} else {
|
|
40318
|
+
this.text.scaleAutoSizeScale(currentScaleX / prevScaleX);
|
|
40319
|
+
}
|
|
40320
|
+
this.text.recoordinate();
|
|
40321
|
+
this.text.transformCanvas();
|
|
40311
40322
|
} else {
|
|
40312
|
-
this.text.
|
|
40323
|
+
this.text.handleInshapeScale();
|
|
40313
40324
|
}
|
|
40314
|
-
this.text.recoordinate();
|
|
40315
|
-
this.text.transformCanvas();
|
|
40316
|
-
} else {
|
|
40317
|
-
this.text.handleInshapeScale();
|
|
40318
40325
|
}
|
|
40319
40326
|
}
|
|
40320
40327
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -42772,17 +42772,24 @@ class Sticker extends BaseItem {
|
|
|
42772
42772
|
this.transformPath();
|
|
42773
42773
|
if (op.method === "applyMatrix") {
|
|
42774
42774
|
const itemOp = op.items.find((i) => i.id === this.id);
|
|
42775
|
-
if (itemOp
|
|
42776
|
-
|
|
42777
|
-
|
|
42778
|
-
|
|
42775
|
+
if (itemOp) {
|
|
42776
|
+
const prevScaleX = this.transformation.previous.scaleX;
|
|
42777
|
+
const prevScaleY = this.transformation.previous.scaleY;
|
|
42778
|
+
const currentScaleX = this.transformation.getScale().x;
|
|
42779
|
+
const currentScaleY = this.transformation.getScale().y;
|
|
42780
|
+
const scaleChanged = Math.abs(currentScaleX - prevScaleX) > 0.0001 || Math.abs(currentScaleY - prevScaleY) > 0.0001;
|
|
42781
|
+
if (scaleChanged) {
|
|
42782
|
+
if (this.text.isAutosize()) {
|
|
42783
|
+
if (Math.abs(currentScaleX - currentScaleY) > 0.0001) {
|
|
42784
|
+
this.text.applyAutoSizeScale(this.text.calcAutoSize());
|
|
42785
|
+
} else {
|
|
42786
|
+
this.text.scaleAutoSizeScale(currentScaleX / prevScaleX);
|
|
42787
|
+
}
|
|
42788
|
+
this.text.recoordinate();
|
|
42789
|
+
this.text.transformCanvas();
|
|
42779
42790
|
} else {
|
|
42780
|
-
this.text.
|
|
42791
|
+
this.text.handleInshapeScale();
|
|
42781
42792
|
}
|
|
42782
|
-
this.text.recoordinate();
|
|
42783
|
-
this.text.transformCanvas();
|
|
42784
|
-
} else {
|
|
42785
|
-
this.text.handleInshapeScale();
|
|
42786
42793
|
}
|
|
42787
42794
|
}
|
|
42788
42795
|
}
|