emacroh5lib 1.0.57 → 1.0.58

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.57",
3
+ "version": "1.0.58",
4
4
  "description": "EMacro前端组件库",
5
5
  "main": "dist/emacroh5lib.min.js",
6
6
  "scripts": {
@@ -189,6 +189,11 @@
189
189
  const { width, height } = this.listDataCache[index];
190
190
  this.setStyleByName(this.image, "width", width);
191
191
  this.setStyleByName(this.image, "height", height);
192
+
193
+ setTimeout(() => {
194
+ this.resetZoom();
195
+ this.resetPosition();
196
+ }, 100);
192
197
  })
193
198
 
194
199
  Promise.race(promises).then((data) => {
@@ -199,12 +204,10 @@
199
204
  this.setStyleByName(this.image, "width", width);
200
205
  this.setStyleByName(this.image, "height", height);
201
206
 
202
- setTimeout(() => {
203
- this.resetZoom(false);
204
- setTimeout(() => {
205
- this.resetZoom();
206
- }, 200);
207
- }, 0);
207
+ // setTimeout(() => {
208
+ // this.resetZoom();
209
+ // this.resetPosition();
210
+ // }, 100);
208
211
  })
209
212
 
210
213
  },
@@ -279,8 +282,10 @@
279
282
  $this.setStyleByName(image, "width", `${width}px`);
280
283
  $this.setStyleByName(image, "height", `${height}px`);
281
284
 
282
- this.listDataCache[this.index].width = `${width}px`;
283
- this.listDataCache[this.index].height = `${height}px`;
285
+ if (this.listDataCache[this.index]) {
286
+ this.listDataCache[this.index].width = `${width}px`;
287
+ this.listDataCache[this.index].height = `${height}px`;
288
+ }
284
289
  }
285
290
 
286
291
  },