emacroh5lib 1.0.43 → 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
@@ -285,11 +285,8 @@
|
|
285
285
|
|
286
286
|
// Set style by name
|
287
287
|
setStyleByName(obj, key, value) {
|
288
|
-
|
289
|
-
|
290
|
-
} catch (error) {
|
291
|
-
console.log("setStyleByName", error, obj, key, value);
|
292
|
-
}
|
288
|
+
obj && (obj.style[key] = value);
|
289
|
+
|
293
290
|
},
|
294
291
|
|
295
292
|
// Get element current transform
|
@@ -333,11 +330,15 @@
|
|
333
330
|
|
334
331
|
setTimeout(() => {
|
335
332
|
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
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
|
+
}
|
341
342
|
|
342
343
|
this.resetZoom();
|
343
344
|
this.resetPosition();
|