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

Enable photo download in the viewer toolbar #304

Closed inakibs closed 1 month ago

inakibs commented 9 months ago

Using this component I would be interested in having an image download button in toolbar, I understand there is nothing implemented yet. Is there any intention on this being able to be done in the future or any suggestions on how to be able to do this?

mirari commented 9 months ago

Perhaps the example at the top of the document is exactly what you want.

custom toolbar

panknows commented 6 months ago

Perhaps the example at the top of the document is exactly what you want.

custom toolbar

How to make it globally?

mirari commented 6 months ago

Perhaps the example at the top of the document is exactly what you want. custom toolbar

How to make it globally?

Originally you could use defaultOptions to override some of the default settings, but when customizing buttons, it's difficult to get to the viewer object, so the best way to do this is to wrap a custom component.

panknows commented 6 months ago

Originally you could use defaultOptions to override some of the default settings, but when customizing buttons, it's difficult to get to the viewer object, so the best way to do this is to wrap a custom component.

We can provide current viewer object to method parameter?

mirari commented 6 months ago

The defaultOptions usage doesn't work because there is no chance to get the viewer object at this point