microboard-temp 0.5.28 → 0.5.29
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 -4
- package/dist/cjs/index.js +16 -4
- package/dist/cjs/node.js +16 -4
- package/dist/esm/browser.js +16 -4
- package/dist/esm/index.js +16 -4
- package/dist/esm/node.js +16 -4
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -42121,10 +42121,22 @@ class ImageItem extends BaseItem {
|
|
|
42121
42121
|
};
|
|
42122
42122
|
updateMbr() {
|
|
42123
42123
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
42124
|
-
|
|
42125
|
-
this.
|
|
42126
|
-
|
|
42127
|
-
|
|
42124
|
+
const rotation = this.transformation.getRotation();
|
|
42125
|
+
const width2 = this.image.width * scaleX;
|
|
42126
|
+
const height2 = this.image.height * scaleY;
|
|
42127
|
+
if (rotation % 180 === 0) {
|
|
42128
|
+
this.left = translateX;
|
|
42129
|
+
this.top = translateY;
|
|
42130
|
+
this.right = this.left + width2;
|
|
42131
|
+
this.bottom = this.top + height2;
|
|
42132
|
+
} else {
|
|
42133
|
+
const centerX = translateX + width2 / 2;
|
|
42134
|
+
const centerY = translateY + height2 / 2;
|
|
42135
|
+
this.left = centerX - height2 / 2;
|
|
42136
|
+
this.top = centerY - width2 / 2;
|
|
42137
|
+
this.right = this.left + height2;
|
|
42138
|
+
this.bottom = this.top + width2;
|
|
42139
|
+
}
|
|
42128
42140
|
}
|
|
42129
42141
|
doOnceBeforeOnLoad = (callback) => {
|
|
42130
42142
|
this.loadCallbacks.push(callback);
|
package/dist/cjs/index.js
CHANGED
|
@@ -42121,10 +42121,22 @@ class ImageItem extends BaseItem {
|
|
|
42121
42121
|
};
|
|
42122
42122
|
updateMbr() {
|
|
42123
42123
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
42124
|
-
|
|
42125
|
-
this.
|
|
42126
|
-
|
|
42127
|
-
|
|
42124
|
+
const rotation = this.transformation.getRotation();
|
|
42125
|
+
const width2 = this.image.width * scaleX;
|
|
42126
|
+
const height2 = this.image.height * scaleY;
|
|
42127
|
+
if (rotation % 180 === 0) {
|
|
42128
|
+
this.left = translateX;
|
|
42129
|
+
this.top = translateY;
|
|
42130
|
+
this.right = this.left + width2;
|
|
42131
|
+
this.bottom = this.top + height2;
|
|
42132
|
+
} else {
|
|
42133
|
+
const centerX = translateX + width2 / 2;
|
|
42134
|
+
const centerY = translateY + height2 / 2;
|
|
42135
|
+
this.left = centerX - height2 / 2;
|
|
42136
|
+
this.top = centerY - width2 / 2;
|
|
42137
|
+
this.right = this.left + height2;
|
|
42138
|
+
this.bottom = this.top + width2;
|
|
42139
|
+
}
|
|
42128
42140
|
}
|
|
42129
42141
|
doOnceBeforeOnLoad = (callback) => {
|
|
42130
42142
|
this.loadCallbacks.push(callback);
|
package/dist/cjs/node.js
CHANGED
|
@@ -44594,10 +44594,22 @@ class ImageItem extends BaseItem {
|
|
|
44594
44594
|
};
|
|
44595
44595
|
updateMbr() {
|
|
44596
44596
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
44597
|
-
|
|
44598
|
-
this.
|
|
44599
|
-
|
|
44600
|
-
|
|
44597
|
+
const rotation = this.transformation.getRotation();
|
|
44598
|
+
const width2 = this.image.width * scaleX;
|
|
44599
|
+
const height2 = this.image.height * scaleY;
|
|
44600
|
+
if (rotation % 180 === 0) {
|
|
44601
|
+
this.left = translateX;
|
|
44602
|
+
this.top = translateY;
|
|
44603
|
+
this.right = this.left + width2;
|
|
44604
|
+
this.bottom = this.top + height2;
|
|
44605
|
+
} else {
|
|
44606
|
+
const centerX = translateX + width2 / 2;
|
|
44607
|
+
const centerY = translateY + height2 / 2;
|
|
44608
|
+
this.left = centerX - height2 / 2;
|
|
44609
|
+
this.top = centerY - width2 / 2;
|
|
44610
|
+
this.right = this.left + height2;
|
|
44611
|
+
this.bottom = this.top + width2;
|
|
44612
|
+
}
|
|
44601
44613
|
}
|
|
44602
44614
|
doOnceBeforeOnLoad = (callback) => {
|
|
44603
44615
|
this.loadCallbacks.push(callback);
|
package/dist/esm/browser.js
CHANGED
|
@@ -41967,10 +41967,22 @@ class ImageItem extends BaseItem {
|
|
|
41967
41967
|
};
|
|
41968
41968
|
updateMbr() {
|
|
41969
41969
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
41970
|
-
|
|
41971
|
-
this.
|
|
41972
|
-
|
|
41973
|
-
|
|
41970
|
+
const rotation = this.transformation.getRotation();
|
|
41971
|
+
const width2 = this.image.width * scaleX;
|
|
41972
|
+
const height2 = this.image.height * scaleY;
|
|
41973
|
+
if (rotation % 180 === 0) {
|
|
41974
|
+
this.left = translateX;
|
|
41975
|
+
this.top = translateY;
|
|
41976
|
+
this.right = this.left + width2;
|
|
41977
|
+
this.bottom = this.top + height2;
|
|
41978
|
+
} else {
|
|
41979
|
+
const centerX = translateX + width2 / 2;
|
|
41980
|
+
const centerY = translateY + height2 / 2;
|
|
41981
|
+
this.left = centerX - height2 / 2;
|
|
41982
|
+
this.top = centerY - width2 / 2;
|
|
41983
|
+
this.right = this.left + height2;
|
|
41984
|
+
this.bottom = this.top + width2;
|
|
41985
|
+
}
|
|
41974
41986
|
}
|
|
41975
41987
|
doOnceBeforeOnLoad = (callback) => {
|
|
41976
41988
|
this.loadCallbacks.push(callback);
|
package/dist/esm/index.js
CHANGED
|
@@ -41960,10 +41960,22 @@ class ImageItem extends BaseItem {
|
|
|
41960
41960
|
};
|
|
41961
41961
|
updateMbr() {
|
|
41962
41962
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
41963
|
-
|
|
41964
|
-
this.
|
|
41965
|
-
|
|
41966
|
-
|
|
41963
|
+
const rotation = this.transformation.getRotation();
|
|
41964
|
+
const width2 = this.image.width * scaleX;
|
|
41965
|
+
const height2 = this.image.height * scaleY;
|
|
41966
|
+
if (rotation % 180 === 0) {
|
|
41967
|
+
this.left = translateX;
|
|
41968
|
+
this.top = translateY;
|
|
41969
|
+
this.right = this.left + width2;
|
|
41970
|
+
this.bottom = this.top + height2;
|
|
41971
|
+
} else {
|
|
41972
|
+
const centerX = translateX + width2 / 2;
|
|
41973
|
+
const centerY = translateY + height2 / 2;
|
|
41974
|
+
this.left = centerX - height2 / 2;
|
|
41975
|
+
this.top = centerY - width2 / 2;
|
|
41976
|
+
this.right = this.left + height2;
|
|
41977
|
+
this.bottom = this.top + width2;
|
|
41978
|
+
}
|
|
41967
41979
|
}
|
|
41968
41980
|
doOnceBeforeOnLoad = (callback) => {
|
|
41969
41981
|
this.loadCallbacks.push(callback);
|
package/dist/esm/node.js
CHANGED
|
@@ -44428,10 +44428,22 @@ class ImageItem extends BaseItem {
|
|
|
44428
44428
|
};
|
|
44429
44429
|
updateMbr() {
|
|
44430
44430
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
44431
|
-
|
|
44432
|
-
this.
|
|
44433
|
-
|
|
44434
|
-
|
|
44431
|
+
const rotation = this.transformation.getRotation();
|
|
44432
|
+
const width2 = this.image.width * scaleX;
|
|
44433
|
+
const height2 = this.image.height * scaleY;
|
|
44434
|
+
if (rotation % 180 === 0) {
|
|
44435
|
+
this.left = translateX;
|
|
44436
|
+
this.top = translateY;
|
|
44437
|
+
this.right = this.left + width2;
|
|
44438
|
+
this.bottom = this.top + height2;
|
|
44439
|
+
} else {
|
|
44440
|
+
const centerX = translateX + width2 / 2;
|
|
44441
|
+
const centerY = translateY + height2 / 2;
|
|
44442
|
+
this.left = centerX - height2 / 2;
|
|
44443
|
+
this.top = centerY - width2 / 2;
|
|
44444
|
+
this.right = this.left + height2;
|
|
44445
|
+
this.bottom = this.top + width2;
|
|
44446
|
+
}
|
|
44435
44447
|
}
|
|
44436
44448
|
doOnceBeforeOnLoad = (callback) => {
|
|
44437
44449
|
this.loadCallbacks.push(callback);
|