|
@@ -109,13 +109,13 @@ export default {
|
|
|
watch: {
|
|
|
"hotspot.serialFrameInfo.img": {
|
|
|
handler(vNew) {
|
|
|
- console.error('vNew',vNew);
|
|
|
+ console.error("vNew", vNew);
|
|
|
if (vNew && vNew.length > 0) {
|
|
|
this.calcFrameData();
|
|
|
}
|
|
|
},
|
|
|
immediate: true,
|
|
|
- deep:true
|
|
|
+ deep: true,
|
|
|
},
|
|
|
frameHeight: {
|
|
|
handler() {
|
|
@@ -159,7 +159,7 @@ export default {
|
|
|
}, 200);
|
|
|
},
|
|
|
calcFrameData() {
|
|
|
- console.log('calcFrameData');
|
|
|
+ console.log("calcFrameData");
|
|
|
setTimeout(() => {
|
|
|
try {
|
|
|
this.frameHeight = this.$refs["serial-frame-preview"].naturalHeight;
|
|
@@ -174,7 +174,10 @@ export default {
|
|
|
}
|
|
|
|
|
|
console.log("frameNumber", Math.ceil(frameNumber));
|
|
|
- this.hotspot.serialFrameInfo.duration = 1;
|
|
|
+ if (!this.hotspot.serialFrameInfo.duration) {
|
|
|
+ this.hotspot.serialFrameInfo.duration = 1;
|
|
|
+ }
|
|
|
+
|
|
|
this.hotspot.serialFrameInfo.frameWidth = this.frameWidth;
|
|
|
}
|
|
|
} catch (e) {
|