feat(svelte) add fitViewOptions, closes #3440
This commit is contained in:
@@ -199,7 +199,7 @@ const OverviewFlow = () => {
|
||||
onConnect={onConnect}
|
||||
onPaneClick={onPaneClick}
|
||||
onPaneScroll={onPaneScroll}
|
||||
onPaneContextMenu={onPaneContextMenu}
|
||||
// onPaneContextMenu={onPaneContextMenu}
|
||||
onNodeDragStart={onNodeDragStart}
|
||||
onNodeDrag={onNodeDrag}
|
||||
onNodeDragStop={onNodeDragStop}
|
||||
@@ -221,7 +221,7 @@ const OverviewFlow = () => {
|
||||
onEdgeMouseLeave={onEdgeMouseLeave}
|
||||
onEdgeDoubleClick={onEdgeDoubleClick}
|
||||
fitView
|
||||
fitViewOptions={{ padding: 0.2 }}
|
||||
fitViewOptions={{ padding: 0.1, nodes: [{ id: '1' }] }}
|
||||
attributionPosition="top-right"
|
||||
maxZoom={Infinity}
|
||||
onNodesDelete={onNodesDelete}
|
||||
|
||||
@@ -130,8 +130,16 @@
|
||||
{nodeTypes}
|
||||
{edgeTypes}
|
||||
fitView
|
||||
minZoom={0.1}
|
||||
maxZoom={2.5}
|
||||
fitViewOptions={{
|
||||
padding: 10,
|
||||
nodes: [
|
||||
{
|
||||
id: '1'
|
||||
}
|
||||
]
|
||||
}}
|
||||
minZoom={0}
|
||||
maxZoom={Infinity}
|
||||
selectionMode={SelectionMode.Full}
|
||||
initialViewport={{ x: 100, y: 100, zoom: 2 }}
|
||||
snapGrid={[25, 25]}
|
||||
|
||||
Reference in New Issue
Block a user