
Security News
Insecure Agents Podcast: Certified Patches, Supply Chain Security, and AI Agents
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.
vue-image-zoomify
Advanced tools
An image zooming feature for Vue, enabling zoom in and out functionalities.
An image zooming feature for Vue, enabling zoom in and out functionalities.
npm i vue-image-zoomify@latest
<VueImageZoomify :src="src" />
...
<script>
import { VueImageZoomify } from "vue-image-zoomify";
export default {
components: { VueImageZoomify },
};
</script>
<template>
<div class="wrapper">
<div style="display: flex; gap: 10px; margin: 10px 0 0 20px">
<button @click="onChangeImg(1)">IMG 1</button>
<button @click="onChangeImg(2)">IMG 2</button>
<button @click="onChangeImg(2)">IMG 3</button>
<button @click="changeEnableButton()">enableButton</button>
</div>
<br />
<div
style="
width: calc(100% - 40px);
height: 400px;
border: 1px solid #333;
border-radius: 10px;
margin: 0 20px 10px 20px;
overflow: hidden;
"
>
<VueImageZoomify ref="imgCanvas" :src="imgSrc" :enable-button="enableButton" />
</div>
<button v-if="!enableButton" @click="onClickZoom('in')">+</button>
<button v-if="!enableButton" @click="onClickZoom('out')">-</button>
<button v-if="!enableButton" @click="onClickZoom('reset')">reset</button>
</div>
</template>
<script>
import { VueImageZoomify } from "vue-image-zoomify";
import IMG1 from "@/assets/20240111.jpg";
const imgs = {
1: IMG1,
2: "https://th.bing.com/th/id/OIG.l4zSBOrvP_1FquYSRwyw?pid=ImgGn",
3: "https://th.bing.com/th/id/OIG.PleGemfkpxw4enZbAZd7?pid=ImgGn",
};
export default {
components: { VueImageZoomify },
data() {
return {
enableButton: true,
imgSrc: imgs["1"],
};
},
methods: {
onChangeImg(num) {
this.imgSrc = imgs[num];
},
onClickZoom(val) {
const zoom = this.$refs.imgCanvas;
if (val === "in") {
zoom.onZoomIn();
} else if (val === "out") {
zoom.onZoomOut();
} else if (val === "reset") {
zoom.onZoomReset();
}
},
changeEnableButton(){
this.enableButton = !this.enableButton
}
},
};
</script>
FAQs
An image zooming feature for Vue, enabling zoom in and out functionalities.
The npm package vue-image-zoomify receives a total of 126 weekly downloads. As such, vue-image-zoomify popularity was classified as not popular.
We found that vue-image-zoomify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.

Security News
The planned feature introduces a review step before releases go live, following the Shai-Hulud attacks and a rocky migration off classic tokens that disrupted maintainer workflows.