@moritzbrantner/diagrams - v0.1.1
    Preparing search index...

    Type Alias DiagramInteractiveProps<TNode, TEdge>

    Shared controlled props for diagrams that opt into canvas interaction features.

    type DiagramInteractiveProps<TNode, TEdge> = {
        defaultHighlightedElement?: DiagramElementRef | null;
        defaultInspectedEdgeId?: string | null;
        defaultSearchQuery?: string;
        defaultViewport?: DiagramViewport;
        focusedSearchResult?: DiagramElementRef | null;
        getSearchText?: (
            item: { id: string; item: TNode | TEdge; kind: DiagramElementKind },
        ) => string;
        highlightedElement?: DiagramElementRef | null;
        inspectedEdgeId?: string | null;
        interactiveFeatures?: DiagramInteractiveFeatures;
        onFocusedSearchResultChange?: (
            result: DiagramSearchResult<TNode, TEdge> | null,
        ) => void;
        onHighlightedElementChange?: (element: DiagramElementRef | null) => void;
        onInspectedEdgeIdChange?: (edgeId: string | null) => void;
        onSearchQueryChange?: (query: string) => void;
        onViewportChange?: (
            viewport: DiagramViewport,
            reason: DiagramViewportChangeReason,
        ) => void;
        renderEdgeInspector?: (
            context: DiagramEdgeInspectorContext<TNode, TEdge>,
        ) => React.ReactNode;
        searchQuery?: string;
        viewport?: DiagramViewport;
    }

    Type Parameters

    • TNode
    • TEdge
    Index

    Properties

    defaultHighlightedElement?: DiagramElementRef | null
    defaultInspectedEdgeId?: string | null
    defaultSearchQuery?: string
    defaultViewport?: DiagramViewport
    focusedSearchResult?: DiagramElementRef | null
    getSearchText?: (
        item: { id: string; item: TNode | TEdge; kind: DiagramElementKind },
    ) => string
    highlightedElement?: DiagramElementRef | null
    inspectedEdgeId?: string | null
    interactiveFeatures?: DiagramInteractiveFeatures
    onFocusedSearchResultChange?: (
        result: DiagramSearchResult<TNode, TEdge> | null,
    ) => void
    onHighlightedElementChange?: (element: DiagramElementRef | null) => void
    onInspectedEdgeIdChange?: (edgeId: string | null) => void
    onSearchQueryChange?: (query: string) => void
    onViewportChange?: (
        viewport: DiagramViewport,
        reason: DiagramViewportChangeReason,
    ) => void
    renderEdgeInspector?: (
        context: DiagramEdgeInspectorContext<TNode, TEdge>,
    ) => React.ReactNode
    searchQuery?: string
    viewport?: DiagramViewport