microboard-ui-temp 0.1.87 → 0.1.89
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/example.html +1 -1
- package/dist/index.js +16 -4
- package/dist/spa.js +16 -4
- package/package.json +2 -2
package/dist/example.html
CHANGED
package/dist/index.js
CHANGED
|
@@ -250194,10 +250194,22 @@ class ImageItem extends BaseItem {
|
|
|
250194
250194
|
};
|
|
250195
250195
|
updateMbr() {
|
|
250196
250196
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
250197
|
-
|
|
250198
|
-
this.
|
|
250199
|
-
|
|
250200
|
-
|
|
250197
|
+
const rotation = this.transformation.getRotation();
|
|
250198
|
+
const width2 = this.image.width * scaleX;
|
|
250199
|
+
const height2 = this.image.height * scaleY;
|
|
250200
|
+
if (rotation % 180 === 0) {
|
|
250201
|
+
this.left = translateX;
|
|
250202
|
+
this.top = translateY;
|
|
250203
|
+
this.right = this.left + width2;
|
|
250204
|
+
this.bottom = this.top + height2;
|
|
250205
|
+
} else {
|
|
250206
|
+
const centerX = translateX + width2 / 2;
|
|
250207
|
+
const centerY = translateY + height2 / 2;
|
|
250208
|
+
this.left = centerX - height2 / 2;
|
|
250209
|
+
this.top = centerY - width2 / 2;
|
|
250210
|
+
this.right = this.left + height2;
|
|
250211
|
+
this.bottom = this.top + width2;
|
|
250212
|
+
}
|
|
250201
250213
|
}
|
|
250202
250214
|
doOnceBeforeOnLoad = (callback) => {
|
|
250203
250215
|
this.loadCallbacks.push(callback);
|
package/dist/spa.js
CHANGED
|
@@ -250194,10 +250194,22 @@ class ImageItem extends BaseItem {
|
|
|
250194
250194
|
};
|
|
250195
250195
|
updateMbr() {
|
|
250196
250196
|
const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
|
|
250197
|
-
|
|
250198
|
-
this.
|
|
250199
|
-
|
|
250200
|
-
|
|
250197
|
+
const rotation = this.transformation.getRotation();
|
|
250198
|
+
const width2 = this.image.width * scaleX;
|
|
250199
|
+
const height2 = this.image.height * scaleY;
|
|
250200
|
+
if (rotation % 180 === 0) {
|
|
250201
|
+
this.left = translateX;
|
|
250202
|
+
this.top = translateY;
|
|
250203
|
+
this.right = this.left + width2;
|
|
250204
|
+
this.bottom = this.top + height2;
|
|
250205
|
+
} else {
|
|
250206
|
+
const centerX = translateX + width2 / 2;
|
|
250207
|
+
const centerY = translateY + height2 / 2;
|
|
250208
|
+
this.left = centerX - height2 / 2;
|
|
250209
|
+
this.top = centerY - width2 / 2;
|
|
250210
|
+
this.right = this.left + height2;
|
|
250211
|
+
this.bottom = this.top + width2;
|
|
250212
|
+
}
|
|
250201
250213
|
}
|
|
250202
250214
|
doOnceBeforeOnLoad = (callback) => {
|
|
250203
250215
|
this.loadCallbacks.push(callback);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "microboard-ui-temp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.89",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"i18next-browser-languagedetector": "^8.2.0",
|
|
61
61
|
"js-cookie": "^3.0.5",
|
|
62
62
|
"jwt-decode": "^4.0.0",
|
|
63
|
-
"microboard-temp": "^0.5.
|
|
63
|
+
"microboard-temp": "^0.5.29",
|
|
64
64
|
"nanoid": "^5.1.5",
|
|
65
65
|
"prop-types": "^15.8.1",
|
|
66
66
|
"react-hot-toast": "2.4.1",
|