mirari / v-viewer

Image viewer component for vue, supports rotation, scale, zoom and so on, based on viewer.js
https://mirari.cc/v-viewer/
MIT License
2.46k stars 292 forks source link

Image Deletion Event Emission or Customizable Event #305

Closed besart-rr closed 9 months ago

besart-rr commented 9 months ago

I would like to propose an enhancement to v-viewer that enables the emission of an event for image deletion or customizable event. Currently, there isn't a direct way to trigger an event to delete an image within the v-viewer gallery. This feature would greatly benefit developers needing to integrate image deletion functionality within their applications using v-viewer.

mirari commented 9 months ago

Unfortunately, viewerjs does not support this feature, and v-viewer is just an adapter. Perhaps you can achieve your needs by customizing the toolbar, refer to this example: https://codepen.io/mirari/pen/OJdrNrR Its flaw is that you cannot stay at the original index after deleting a picture.