layout

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlgorithmHorizontal     = "ALGORITHM_HORIZONTAL"
	ScopeFullCanvas         = "SCOPE_FULL_CANVAS"
	ScopeConnectedComponent = "SCOPE_CONNECTED_COMPONENT"
)

Variables

This section is empty.

Functions

func ApplyLayout

func ApplyLayout(nodes []N, edges []E, layout *AutoLayout) ([]N, []E, error)

Types

type AutoLayout

type AutoLayout struct {
	Algorithm string   `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
	Scope     string   `json:"scope,omitempty" yaml:"scope,omitempty"`
	NodeIDs   []string `json:"nodeIds,omitempty" yaml:"nodeIds,omitempty"`
}

AutoLayout configures optional automatic node positioning.

func DefaultAutoLayout

func DefaultAutoLayout() AutoLayout

func ParseAutoLayout

func ParseAutoLayout(value string, scopeValue string, nodeIDs []string) (*AutoLayout, error)

type E

type E struct {
	SourceID string
	TargetID string
	Channel  string
}

type N

type N struct {
	ID       string
	Type     string
	Position Position
}

type Position

type Position struct {
	X int
	Y int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL