Sign in

    This version of the module is deprecated: Moved to moonbit-community/diago. Use moonbit-community/diago@0.4.0 or later and update import paths.

    Milky2018/diago/engine_api does not have a README file

    LayoutEngine

    Layout engine interface.

    Engines must not mutate their input graph. They return a patch that can be applied by the caller.

    LayoutError

    pub(all) suberror LayoutError {
    InvalidGraph(String)
    CycleDetected(String)
    Unsupported(String)
    }

    Layout error
    impl Eq for LayoutError
    impl Show for LayoutError

    Direction

    pub(all) enum Direction {
    Down
    Right
    Up
    Left
    }

    Layout direction
    impl Eq for Direction
    impl Show for Direction

    LayoutConfig

    pub struct LayoutConfig {
    horizontal_spacing : Double
    vertical_spacing : Double
    container_padding : Double
    default_width : Double
    default_height : Double
    edge_padding : Double
    }

    Layout configuration

    LayoutConfig::new

    LayoutConfig::with_spacing

    fn LayoutConfig::with_spacing(horizontal : Double, vertical : Double) -> LayoutConfig

    cycle_detected

    fn cycle_detected(message : String) -> LayoutError

    invalid_graph

    fn invalid_graph(message : String) -> LayoutError

    Construct an engine_api.LayoutError from outside this package.

    layout_with_engine

    fn[Engine : LayoutEngine] layout_with_engine(engine : Engine, graph :
    GraphInput
    , config : LayoutConfig, direction : Direction) ->
    GraphInput
    raise LayoutError

    Perform layout on a graph (including variants) with a specific engine.

    Returns a new graph with layout applied.

    unsupported

    fn unsupported(message : String) -> LayoutError

    Source Files