animaflow.LayoutEngine
O motor de layout responsável pelo posicionamento semântico, cálculo de bounding boxes e distribuição de colunas em camadas (DAGs).
animaflow.core.layout.LayoutEngine
Calculates spatial positions for nodes in a flow with collision-free gap spacing.
Source code in src/animaflow/core/layout.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
calculate_label_aware_gap(nodes: List[Node], edges: List[Edge], min_gap: float = 0.85, min_label_padding: float = 0.4) -> float
staticmethod
Determines the minimum gap needed so that edge labels/pill badges never collide with boxes.
Source code in src/animaflow/core/layout.py
arrange_horizontal(nodes: List[Node], gap: float = 0.85, y: float = 0.0, spacing: float = None, edges: Optional[List[Edge]] = None, min_label_gap: bool = True) -> float
staticmethod
Arranges nodes horizontally with an exact minimum gap between adjacent borders.
Source code in src/animaflow/core/layout.py
arrange_vertical(nodes: List[Node], gap: float = 0.7, x: float = 0.0, spacing: float = None, edges: Optional[List[Edge]] = None) -> float
staticmethod
Arranges nodes vertically with an exact minimum gap between adjacent borders.
Source code in src/animaflow/core/layout.py
arrange_layers(layers: List[List[Node]], h_gap: float = 1.1, v_gap: float = 0.9) -> None
staticmethod
Arranges nodes in distinct horizontal stages/layers (DAG layout). Each column represents a stage, centered along X and each column centered along Y.