diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue index 133bdbb54f7..8163947cd0c 100644 --- a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue @@ -42,6 +42,9 @@ export default { }, methods: { onImgLoad() { + requestIdleCallback(this.calculateImgSize, { timeout: 1000 }); + }, + calculateImgSize() { const { contentImg } = this.$refs; if (contentImg) { |