Skip to content

Commit

Permalink
Merge pull request #1274 from lf-lang/port-labels
Browse files Browse the repository at this point in the history
Deactivate middle position for labels on unconnencted ports
  • Loading branch information
edwardalee committed Jul 5, 2022
2 parents c986115 + 9295958 commit 2011cca
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -608,7 +608,8 @@ private KNode configureReactorNodeLayout(KNode node) {
// Allows to freely shuffle ports on each side
setLayoutOption(node, CoreOptions.PORT_CONSTRAINTS, PortConstraints.FIXED_SIDE);
// Adjust port label spacing to be closer to edge but not overlap with port figure
setLayoutOption(node, CoreOptions.PORT_LABELS_PLACEMENT, EnumSet.of(PortLabelPlacement.ALWAYS_OTHER_SAME_SIDE, PortLabelPlacement.OUTSIDE, PortLabelPlacement.NEXT_TO_PORT_IF_POSSIBLE));
// TODO: Add PortLabelPlacement.NEXT_TO_PORT_IF_POSSIBLE back into the configuration, as soon as ELK provides a fix for LF issue #1273
setLayoutOption(node, CoreOptions.PORT_LABELS_PLACEMENT, EnumSet.of(PortLabelPlacement.ALWAYS_OTHER_SAME_SIDE, PortLabelPlacement.OUTSIDE));
setLayoutOption(node, CoreOptions.SPACING_LABEL_PORT_HORIZONTAL, 2.0);
setLayoutOption(node, CoreOptions.SPACING_LABEL_PORT_VERTICAL, -3.0);
// Balanced placement with straight long edges.
Expand Down

0 comments on commit 2011cca

Please sign in to comment.