SimonSiefke / vscode-svg-preview

Svg Preview for VSCode
MIT License
44 stars 4 forks source link

Support generated SVG files #89

Open hefroy opened 4 years ago

hefroy commented 4 years ago

Generating an SVG file, e.g. using state-machine-cat, is currently not compatible with Svg Preview.

When the SVG file is re-written, either the displayed image is not updated, or the whole displayed image goes blank. It is then necessary to right-click on the SVG file in the browser and click Open Preview to show the updated image.

A fix that adds support for file monitoring should ideally also leave the zoomed in area the same so that you don't have to keep zooming back in for each change - this would mirror the behaviour when live editing.

Version: 2.8.3 Environment: Ubuntu 18.04

SimonSiefke commented 4 years ago

Can you share a gif/screencast of the problem?

JosiahBradley commented 3 years ago

To whom it may concern this is happening to me as well. When I generate an SVG for a CAD preview I can see the image and edit the colors live as expected. The moment I regenerate the image from python the preview breaks, requiring me to close and reopen the preview. Not terrible but more time consuming. I'll see If I can create a gif of what I mean as it's very easy to reproduce.

chipbite commented 2 years ago

I tried this and can confirm. Using plantuml to generate svg diagrams. svg viewer extension window goes blank and has to be closed and reopened. The refresh button top right does nothing at that point, it seems as if the plugin has crashed.

Combined with how it is not the fastest and how it handles windows, it is too bad - since this is the only svg viewer that has good panning in vs code. :)