nanangp / vscode-wireviz-preview

A simple extension for Visual Studio Code to preview WireViz YAML files
https://marketplace.visualstudio.com/items?itemName=NanangP.vscode-wireviz-preview
GNU General Public License v3.0
5 stars 1 forks source link

WebView ignores panel layout and always opens to the side #4

Closed martinrieder closed 5 months ago

martinrieder commented 5 months ago

I prefer to use the editor layout vertically instead of horizontally. The WireViz diagrams that I generate tend to have a landscape orientation. Currently, the layout changes every time the preview is regenerated.

As a simple fix, I propose to exchange wvpanelColumn for docColumn.Beside. It works nicely in my use case, but please confirm whether this is okay in general.

martinrieder commented 5 months ago

Just pasting the code for easy reference: // If we have to dispose an existing one, we'd like to recreate at the same location //const wvpanelColumn = wvpanel?.viewColumn; const docColumn = vscode_2.window.activeTextEditor?.viewColumn; const wvpanelColumn = docColumn.Beside; // get the column beside the editor

nanangp commented 5 months ago

The API says viewColumn, you're not supposed to arrange them in rows! 🙃

martinrieder commented 5 months ago

Nice. Thanks for the quick resolution. It works as expected now. 👍