emacroh5lib 1.0.33 → 1.0.34
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
@@ -91,8 +91,8 @@
|
|
91
91
|
},
|
92
92
|
loadComplete: {
|
93
93
|
type: Function,
|
94
|
-
default: (
|
95
|
-
console.log("loadComplete"
|
94
|
+
default: function () {
|
95
|
+
console.log("loadComplete");
|
96
96
|
}
|
97
97
|
}
|
98
98
|
},
|
@@ -162,13 +162,11 @@
|
|
162
162
|
};
|
163
163
|
|
164
164
|
resolve(event);
|
165
|
-
$this.loadComplete("onload", event)
|
166
165
|
imageObject.onload = null
|
167
166
|
};
|
168
167
|
|
169
168
|
imageObject.onerror = function (event) {
|
170
169
|
resolve(event);
|
171
|
-
$this.loadComplete("onerror", event)
|
172
170
|
imageObject.onerror = null
|
173
171
|
};
|
174
172
|
|
@@ -188,9 +186,14 @@
|
|
188
186
|
Promise.race(promises).then((data) => {
|
189
187
|
this.image = this.$refs["duoViewerImage"];
|
190
188
|
this.initDrag();
|
191
|
-
|
192
|
-
|
193
|
-
|
189
|
+
this.loadComplete()
|
190
|
+
try {
|
191
|
+
const { width, height } = $this.listDataCache[index];
|
192
|
+
$this.setStyleByName($this.image, "width", width);
|
193
|
+
$this.setStyleByName($this.image, "height", height);
|
194
|
+
} catch (error) {
|
195
|
+
console.log("promises", error);
|
196
|
+
}
|
194
197
|
})
|
195
198
|
|
196
199
|
},
|