emacroh5lib 1.0.48 → 1.0.51
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/package.json
CHANGED
@@ -136,7 +136,7 @@
|
|
136
136
|
initListDataCache(index = 0) {
|
137
137
|
const promises = [];
|
138
138
|
|
139
|
-
const $this =
|
139
|
+
const $this = this
|
140
140
|
|
141
141
|
this.list.forEach((item, i) => {
|
142
142
|
const imageObject = new Image();
|
@@ -243,7 +243,7 @@
|
|
243
243
|
|
244
244
|
this.setStyleByName(image, "width", `${width}px`);
|
245
245
|
this.setStyleByName(image, "height", `${height}px`);
|
246
|
-
|
246
|
+
|
247
247
|
if (this.listDataCache[this.index] != null) {
|
248
248
|
this.listDataCache[this.index].width = `${width}px`;
|
249
249
|
this.listDataCache[this.index].height = `${height}px`;
|
@@ -357,14 +357,30 @@
|
|
357
357
|
|
358
358
|
setTimeout(() => {
|
359
359
|
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
360
|
+
let data = {
|
361
|
+
transform: {
|
362
|
+
scaleX: "1",
|
363
|
+
skewY: "0",
|
364
|
+
translateX: "-50%",
|
365
|
+
translateY: "-50%",
|
366
|
+
rotate: "0deg",
|
367
|
+
},
|
368
|
+
left: "50%",
|
369
|
+
top: "50%",
|
370
|
+
width: `${imageObject.width}px`,
|
371
|
+
height: `${imageObject.height}px`,
|
372
|
+
};
|
373
|
+
if (this.currentData != null && this.currentData.width != null && this.currentData.height != null &&
|
374
|
+
this.currentData.left != null && this.currentData.top != null && this.currentData.transform != null) {
|
375
|
+
data = this.currentData
|
366
376
|
}
|
367
377
|
|
378
|
+
this.setStyleByName(this.image, "width", data.width);
|
379
|
+
this.setStyleByName(this.image, "height", data.height);
|
380
|
+
this.setStyleByName(this.image, "left", data.left);
|
381
|
+
this.setStyleByName(this.image, "top", data.top);
|
382
|
+
this.setTransform(this.image, data.transform);
|
383
|
+
|
368
384
|
this.resetZoom();
|
369
385
|
this.resetPosition();
|
370
386
|
}, 100);
|