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 | 読み取り可能<Node[]> |
# 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 | 書き込み可能<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> |