-
Notifications
You must be signed in to change notification settings - Fork 14
Description
The mermaid.vscode.maxZoom
configuration setting is only respected after an update has been made to a chart being previewed. Regardless of the user configuration for this setting, the initial preview of a Mermaid chart is limited to 500% zoom (i.e. maxZoom = 5
).
Expected behavior
When opening a Mermaid Chart preview, the user's maxZoom
configuration setting is respected.
Actual behavior
The chart is limited to a maximum 500% zoom level until an update to the underlying chart code is made.
Reproduction steps
-
Set the
mermaid.vscode.maxZoom
setting to10
in the user'ssettings.json
for VS Code -
Create a
test.mmd
file in the workspace, with the following content:flowchart LR foo --> bar
-
Open the Mermaid preview by right-clicking within a
test.mmd
editor and selectingMermaidChart: Preview Diagram
, or selectingMermaidChart: Preview Diagram
from the VS Code command palette. -
In the newly-opened preview panel that opens, zoom in as far as possible. Note that it is limited to 500% zoom.
-
While the preview panel is still open, update
test.mmd
with the following content:flowchart LR foo --> bar bar --> baz
-
In the preview panel, attempt to zoom in further. Note that you can now zoom to 1000% (corresponding to
maxZoom = 10
).