-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable image zoom on small screens so pinch to zoom works
- Loading branch information
1 parent
d8852a4
commit 6d1510b
Showing
1 changed file
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
<template> | ||
<div class="flex flex-col"> | ||
<img :src="src" data-zoomable /> | ||
<TipComponent>Click the image for a closer look!</TipComponent> | ||
<div v-if="enableZoom"> | ||
<img :src="src" data-zoomable /> | ||
<TipComponent>Click the image for a closer look!</TipComponent> | ||
</div> | ||
<div v-else> | ||
<img :src="src" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
const props = defineProps({ | ||
src: { type: String, required: true }, | ||
}); | ||
const enableZoom = window.innerWidth > "900" ? true : false; | ||
</script> |