Closed ChevalMonsieur closed 1 week ago
A workaround for this :
<Controls showFitView={false} showLock={false}>
<ControlButton on:click={fitViewWithOptions}>SVG</ControlButton>
</Controls>
with fitViewWithOptions being :
function fitViewWithOptions() {
fitView(fitViewOptions);
}
I think the docs are wrong here. There are not fitViewOptions for the Controls
component. However we will see if we can add it.
Describe the Bug
On svelteflow, when using the fitViewOptions for fitView, if you put fitViewOptions as a prop to the Controls component like this :
with a fitViewOptions that look like this :
it doesn't do anything except throwing a warning
<Controls> was created with unknown prop 'fitViewOptions'
fitViewOptions works if I call it like this in fitView however :
and the documentation looks like saying you can put fitViewOptions as a prop in Controls just as showLock
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
The options put in parameter of fitViewOptions should have been integrated to the fitView button on the Controls component and shouldn't throw a warning
Screenshots or Videos
No response
Platform
Additional context
No response