From de7395f9a979033ec3d656b9f2545b192070aa2c Mon Sep 17 00:00:00 2001 From: Bryon Lews Date: Tue, 3 Nov 2020 13:28:48 -0500 Subject: [PATCH 1/2] fixing fps and modifying cache --- client/src/components/annotators/ImageAnnotator.vue | 3 ++- client/viame-web-common/components/Viewer.vue | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/annotators/ImageAnnotator.vue b/client/src/components/annotators/ImageAnnotator.vue index 28fae3112..3bc8f702c 100644 --- a/client/src/components/annotators/ImageAnnotator.vue +++ b/client/src/components/annotators/ImageAnnotator.vue @@ -35,8 +35,8 @@ export default Vue.extend({ this.imgs = new Array(this.imageData.length); this.filename = this.imageData[this.frame].filename; this.pendingImgs = new Set(); - this.cacheImages(); if (this.imgs.length) { + this.loadFrame(0); const img = this.imgs[0]; img.onload = () => { img.onload = null; @@ -44,6 +44,7 @@ export default Vue.extend({ this.height = img.naturalHeight; img.cached = true; this.init(); + this.cacheImages(); }; } }, diff --git a/client/viame-web-common/components/Viewer.vue b/client/viame-web-common/components/Viewer.vue index 15d7f13f5..49b7ef082 100644 --- a/client/viame-web-common/components/Viewer.vue +++ b/client/viame-web-common/components/Viewer.vue @@ -93,6 +93,8 @@ export default defineComponent({ throw new Error(`Cannot parse fps=${fps.value} as integer`); } return parsed; + } if (typeof fps.value === 'number') { + return fps.value; } } return 10; From bed5f55d28fb3bf2273f683d152ade0136646f3f Mon Sep 17 00:00:00 2001 From: Bryon Lews Date: Tue, 3 Nov 2020 13:31:56 -0500 Subject: [PATCH 2/2] mend --- client/viame-web-common/components/Viewer.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/viame-web-common/components/Viewer.vue b/client/viame-web-common/components/Viewer.vue index 49b7ef082..512f16956 100644 --- a/client/viame-web-common/components/Viewer.vue +++ b/client/viame-web-common/components/Viewer.vue @@ -93,7 +93,8 @@ export default defineComponent({ throw new Error(`Cannot parse fps=${fps.value} as integer`); } return parsed; - } if (typeof fps.value === 'number') { + } + if (typeof fps.value === 'number') { return fps.value; } }