_elkjs
ELK data model implemented as typings.TypedDict
s and subprocess
callers to check if elkjs can be installed via npm. The high level
function is call_elkjs.
EDGE_STRAIGHTENING_LAYOUT_OPTIONS
module-attribute
🔗
EDGE_STRAIGHTENING_LAYOUT_OPTIONS: LayoutOptions = {'layered.priority.straightness': '10'}
Options for increasing the edge straightness priority.
ELKOutputChild
module-attribute
🔗
ELKOutputChild = Union[ELKOutputEdge, ELKOutputJunction, ELKOutputLabel, ELKOutputNode, ELKOutputPort]
Type alias for ELK output.
LABEL_LAYOUT_OPTIONS
module-attribute
🔗
LABEL_LAYOUT_OPTIONS: LayoutOptions = {'nodeLabels.placement': 'OUTSIDE, V_BOTTOM, H_CENTER'}
Options for labels to configure ELK layouting.
LAYOUT_OPTIONS
module-attribute
🔗
LAYOUT_OPTIONS: ImmutableLayoutOptions = {'algorithm': 'layered', 'edgeRouting': 'ORTHOGONAL', 'elk.direction': 'RIGHT', 'hierarchyHandling': 'INCLUDE_CHILDREN', 'layered.edgeLabels.sideSelection': 'ALWAYS_DOWN', 'layered.nodePlacement.strategy': 'BRANDES_KOEPF', 'spacing.labelNode': '0.0'}
Available (and possibly useful) Global Options to configure ELK layouting.
See Also
get_global_layered_layout_options : A function that instantiates this class with well-tested settings.
REQUIRED_NPM_PKG_VERSIONS
module-attribute
🔗
REQUIRED_NPM_PKG_VERSIONS: Dict[str, str] = {'elkjs': '0.9.2'}
npm package names and versions required by this Python module.
BaseELKModel 🔗
Bases: BaseModel
Base class for ELK models.
ELKInputChild 🔗
ELKInputData 🔗
ELKInputEdge 🔗
ELKInputLabel 🔗
ELKInputPort 🔗
ELKOutputData 🔗
ELKOutputDiagramElement 🔗
ELKOutputEdge 🔗
ELKOutputElement 🔗
ELKOutputJunction 🔗
ELKOutputLabel 🔗
ELKOutputNode 🔗
ELKOutputPort 🔗
ELKPoint 🔗
ELKSize 🔗
ExecutableNotFoundError 🔗
Bases: NodeJSError
, FileNotFoundError
The required executable could not be found in the PATH.
NodeInstallationError 🔗
Bases: NodeJSError
Installation of the node.js package failed.
NodeJSError 🔗
Bases: RuntimeError
An error happened during node execution.
PORT_LABEL_POSITION 🔗
Bases: Enum
Position of port labels.
ATTRIBUTE | DESCRIPTION |
---|---|
OUTSIDE |
The label is placed outside the port.
|
INSIDE |
The label is placed inside the port owner box.
|
NEXT_TO_PORT_IF_POSSIBLE |
The label is placed next to the port if space allows.
|
ALWAYS_SAME_SIDE |
The label is always placed on the same side of the port.
|
ALWAYS_OTHER_SAME_SIDE |
The label is always placed on the opposite side, but on the same axis.
|
SPACE_EFFICIENT |
The label is positioned in the most space-efficient location.
|
call_elkjs 🔗
call_elkjs(elk_model: ELKInputData) -> ELKOutputData
Call into elk.js to auto-layout the diagram
.
PARAMETER | DESCRIPTION |
---|---|
elk_model
|
The diagram data, sans layouting information
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
layouted_diagram
|
The diagram data, augmented with layouting information |
Source code in capellambse_context_diagrams/_elkjs.py
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 |
|
get_global_layered_layout_options 🔗
get_global_layered_layout_options() -> LayoutOptions
Return optimal ELKLayered configuration.
Source code in capellambse_context_diagrams/_elkjs.py
428 429 430 |
|