fix: custom node example not fitting view
* fit view can't work (for the onLoad event) for elements assigned after the host has mounted (onMounted hook) as we can't calculate a rect of elements that don't exist at flow creation * in this case just trigger fit view __after__ elements have been created/passed to the flow Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -23,9 +23,9 @@ export default (store = useStore()): UseZoomPanHelper => {
|
||||
bounds,
|
||||
store.dimensions.width,
|
||||
store.dimensions.height,
|
||||
options.minZoom || store.minZoom,
|
||||
options.maxZoom || store.maxZoom,
|
||||
options.padding || DEFAULT_PADDING,
|
||||
options.minZoom ?? store.minZoom,
|
||||
options.maxZoom ?? store.maxZoom,
|
||||
options.padding ?? DEFAULT_PADDING,
|
||||
)
|
||||
const transform = zoomIdentity.translate(x, y).scale(zoom)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user