リファレンス

SvelteFlowStore

SvelteFlowStore型は、useStoreフックを介してアクセスできる、内部Svelte Flowストアの構造です。

内部Svelte Flowストアは、高度なユースケースでのみ使用してください。直接使用することはお勧めしません。

export type SvelteFlowStore = {
  flowId: Writable<string | null>;
  nodes: NodesStore;
  nodeLookup: Readable<NodeLookup>;
  edgeLookup: Readable<EdgeLookup>;
  visibleNodes: Readable<Node[]>;
  edges: EdgesStore;
  visibleEdges: Readable<EdgeLayouted[]>;
  connectionLookup: Readable<ConnectionLookup>;
  height: Writable<number>;
  width: Writable<number>;
  minZoom: Writable<number>;
  maxZoom: Writable<number>;
  nodeOrigin: Writable<NodeOrigin>;
  nodeDragThreshold: Writable<number>;
  nodeExtent: Writable<CoordinateExtent>;
  translateExtent: Writable<CoordinateExtent>;
  autoPanOnNodeDrag: Writable<boolean>;
  autoPanOnConnect: Writable<boolean>;
  fitViewOnInit: Writable<boolean>;
  fitViewOnInitDone: Writable<boolean>;
  fitViewOptions: Writable<FitViewOptions>;
  panZoom: Writable<PanZoomInstance | null>;
  snapGrid: Writable<SnapGrid | null>;
  dragging: Writable<boolean>;
  selectionRect: Writable<SelectionRect | null>;
  selectionKeyPressed: Writable<boolean>;
  multiselectionKeyPressed: Writable<boolean>;
  deleteKeyPressed: Writable<boolean>;
  panActivationKeyPressed: Writable<boolean>;
  zoomActivationKeyPressed: Writable<boolean>;
  selectionRectMode: Writable<string | null>;
  selectionMode: Writable<SelectionMode>;
  nodeTypes: Writable<NodeTypes>;
  edgeTypes: Writable<EdgeTypes>;
  viewport: Writable<Viewport>;
  connectionMode: Writable<ConnectionMode>;
  domNode: Writable<HTMLDivElement | null>;
  connection: Readable<ConnectionProps>;
  connectionLineType: Writable<ConnectionLineType>;
  connectionRadius: Writable<number>;
  isValidConnection: Writable<IsValidConnection>;
  nodesDraggable: Writable<boolean>;
  nodesConnectable: Writable<boolean>;
  elementsSelectable: Writable<boolean>;
  selectNodesOnDrag: Writable<boolean>;
  markers: Readable<MarkerProps[]>;
  defaultMarkerColor: Writable<string>;
  lib: Readable<string>;
  onlyRenderVisibleElements: Writable<boolean>;
  onerror: Writable<OnError>;
  ondelete: Writable<OnDelete>;
  onedgecreate: Writable<OnEdgeCreate>;
  onconnect: Writable<OnConnect>;
  onconnectstart: Writable<OnConnectStart>;
  onconnectend: Writable<OnConnectEnd>;
  onbeforedelete: Writable<OnBeforeDelete>;
 
  setNodeTypes: (nodeTypes: NodeTypes) => void;
  setEdgeTypes: (edgeTypes: EdgeTypes) => void;
  addEdge: (edge: Edge | Connection) => void;
  zoomIn: (options?: ViewportHelperFunctionOptions) => void;
  zoomOut: (options?: ViewportHelperFunctionOptions) => void;
  setMinZoom: (minZoom: number) => void;
  setMaxZoom: (maxZoom: number) => void;
  setTranslateExtent: (extent: CoordinateExtent) => void;
  fitView: (options?: FitViewOptions) => boolean;
  updateNodePositions: UpdateNodePositions;
  updateNodeDimensions: (updates: Map<string, NodeDimensionUpdate>) => void;
  unselectNodesAndEdges: (params?: { nodes?: Node[]; edges?: Edge[] }) => void;
  addSelectedNodes: (ids: string[]) => void;
  addSelectedEdges: (ids: string[]) => void;
  handleNodeSelection: (id: string) => void;
  panBy: (delta: XYPosition) => boolean;
  updateConnection: UpdateConnection;
  cancelConnection: () => void;
  reset(): void;
};

フィールド

#flowId
書き込み可能<文字列 | null>
#nodes
NodesStore
#nodeLookup
読み取り可能<NodeLookup>
#edgeLookup
読み取り可能<EdgeLookup>
#visibleNodes
#edges
EdgesStore
#visibleEdges
読み取り可能<EdgeLayouted[]>
#connectionLookup
読み取り可能<ConnectionLookup>
#height
#width
#minZoom
#maxZoom
#nodeOrigin
書き込み可能<NodeOrigin>
#nodeDragThreshold
#nodeExtent
書き込み可能<CoordinateExtent>
#translateExtent
書き込み可能<CoordinateExtent>
#autoPanOnNodeDrag
#autoPanOnConnect
#fitViewOnInit
#fitViewOnInitDone
#fitViewOptions
書き込み可能<FitViewOptions>
#panZoom
書き込み可能<PanZoomInstance | null>
#snapGrid
書き込み可能<SnapGrid | null>
#dragging
#selectionRect
書き込み可能<SelectionRect | null>
#selectionKeyPressed
#multiselectionKeyPressed
#deleteKeyPressed
#panActivationKeyPressed
#zoomActivationKeyPressed
#selectionRectMode
書き込み可能<文字列 | null>
#selectionMode
書き込み可能<選択モード (SelectionMode)>
#nodeTypes
書き込み可能<ノードタイプ (NodeTypes)>
#edgeTypes
書き込み可能<エッジタイプ (EdgeTypes)>
#viewport
#connectionMode
書き込み可能<接続モード (ConnectionMode)>
#domNode
書き込み可能<HTMLDivElement | null>
#connection
読み取り可能<ConnectionProps>
#connectionLineType
書き込み可能<ConnectionLineType>
#connectionRadius
#isValidConnection
書き込み可能<有効な接続か (IsValidConnection)>
#nodesDraggable
#nodesConnectable
#elementsSelectable
#selectNodesOnDrag
#markers
読み取り可能<マーカプロパティ (MarkerProps)[]>
#defaultMarkerColor
#lib
#onlyRenderVisibleElements
#onerror
書き込み可能<エラーハンドラ (OnError)>
#ondelete
書き込み可能<削除ハンドラ (OnDelete)>
#onedgecreate
書き込み可能<エッジ作成ハンドラ (OnEdgeCreate)>
#onconnect
書き込み可能<接続ハンドラ (OnConnect)>
#onconnectstart
書き込み可能<接続開始ハンドラ (OnConnectStart)>
#onconnectend
書き込み可能<接続終了ハンドラ (OnConnectEnd)>
#onbeforedelete
書き込み可能<削除前ハンドラ (OnBeforeDelete)>
#setNodeTypes
書き込み可能<(nodeTypes: ノードタイプ (NodeTypes)) => void>
#setEdgeTypes
書き込み可能<(edgeTypes: エッジタイプ (EdgeTypes)) => void>
#addEdge
書き込み可能<(edge: Edge | Connection) => void>
#zoomIn
書き込み可能<(オプション (options)?: ViewportHelperFunctionOptions) => void>
#zoomOut
書き込み可能<(オプション (options)?: ViewportHelperFunctionOptions) => void>
#setMinZoom
書き込み可能<(最小ズーム (minZoom): 数値) => void>
#setMaxZoom
書き込み可能<(最大ズーム (maxZoom): 数値) => void>
#setTranslateExtent
書き込み可能<(範囲 (extent): CoordinateExtent) => void>
#fitView
書き込み可能<(オプション (options)?: FitViewOptions) => 真偽値>
#updateNodePositions
書き込み可能<ノード位置更新 (UpdateNodePositions)>
#updateNodeDimensions
書き込み可能<(更新情報 (updates): Map<文字列, NodeDimensionUpdate>) => void>
#unselectNodesAndEdges
書き込み可能<(パラメータ (params)?: { ノード (nodes)?: Node[]; エッジ (edges)?: Edge[] }) => void>
#addSelectedNodes
書き込み可能<(ID: 文字列[]) => void>
#addSelectedEdges
書き込み可能<(ID: 文字列[]) => void>
#handleNodeSelection
書き込み可能<(ID: 文字列) => void>
#panBy
書き込み可能<(デルタ: XYPosition) => 真偽値>
#updateConnection
書き込み可能<UpdateConnection>
#cancelConnection
書き込み可能<() => void>
#reset
書き込み可能<() => void>