From 157f5db69058e52878ec4ad8ee745694e356637e Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 6 Feb 2019 21:00:30 -0800 Subject: [PATCH] fix: fix zoomable videos (#947) fixes #946 --- .../dialog/components/MediaDialog.html | 41 +++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/src/routes/_components/dialog/components/MediaDialog.html b/src/routes/_components/dialog/components/MediaDialog.html index bc8d0469..06668a19 100644 --- a/src/routes/_components/dialog/components/MediaDialog.html +++ b/src/routes/_components/dialog/components/MediaDialog.html @@ -11,20 +11,26 @@
- + {#if canPinchZoom} + + + + {:else} - + {/if}
{/each}
- + {#if canPinchZoom} + + {/if} {#if dots.length > 1}
{/if} - + {#if canPinchZoom} + + {/if}
@@ -206,7 +214,8 @@ }), computed: { length: ({ mediaItems }) => mediaItems.length, - dots: ({ length }) => times(length, i => ({ i })) + dots: ({ length }) => times(length, i => ({ i })), + canPinchZoom: ({ mediaItems }) => !mediaItems.some(media => media.type === 'video') }, components: { ModalDialog,