emacroh5lib 1.0.41 → 1.0.44
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
@@ -200,8 +200,8 @@
|
|
200
200
|
},
|
201
201
|
// Reset position
|
202
202
|
resetPosition() {
|
203
|
-
let image = this.image
|
204
|
-
|
203
|
+
let image = this.image;
|
204
|
+
let oldTransform = this.getCurrentTransform(image);
|
205
205
|
|
206
206
|
this.setStyleByName(image, "top", "50%");
|
207
207
|
this.setStyleByName(image, "left", "50%");
|
@@ -286,6 +286,7 @@
|
|
286
286
|
// Set style by name
|
287
287
|
setStyleByName(obj, key, value) {
|
288
288
|
obj && (obj.style[key] = value);
|
289
|
+
|
289
290
|
},
|
290
291
|
|
291
292
|
// Get element current transform
|
@@ -328,13 +329,19 @@
|
|
328
329
|
this.judgeThumbnailListMove(lastIndex, this.index);
|
329
330
|
|
330
331
|
setTimeout(() => {
|
331
|
-
this.resetZoom();
|
332
332
|
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
333
|
+
try {
|
334
|
+
this.setStyleByName(this.image, "width", this.currentData.width);
|
335
|
+
this.setStyleByName(this.image, "height", this.currentData.height);
|
336
|
+
this.setStyleByName(this.image, "left", this.currentData.left);
|
337
|
+
this.setStyleByName(this.image, "top", this.currentData.top);
|
338
|
+
this.setTransform(this.image, this.currentData.transform);
|
339
|
+
} catch (error) {
|
340
|
+
console.log("switchAction", error, this.image, this.currentData);
|
341
|
+
}
|
342
|
+
|
343
|
+
this.resetZoom();
|
344
|
+
this.resetPosition();
|
338
345
|
}, 100);
|
339
346
|
},
|
340
347
|
// To judge thumbnail list move
|