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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emacroh5lib",
3
- "version": "1.0.41",
3
+ "version": "1.0.44",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "dist/emacroh5lib.min.js",
6
6
  "scripts": {
@@ -200,8 +200,8 @@
200
200
  },
201
201
  // Reset position
202
202
  resetPosition() {
203
- let image = this.image,
204
- oldTransform = this.getCurrentTransform(image);
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
- this.setStyleByName(this.image, "width", this.currentData.width);
334
- this.setStyleByName(this.image, "height", this.currentData.height);
335
- this.setStyleByName(this.image, "left", this.currentData.left);
336
- this.setStyleByName(this.image, "top", this.currentData.top);
337
- this.setTransform(this.image, this.currentData.transform);
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