Skip to content

Commit

Permalink
fix variableBlock background offset when name too long
Browse files Browse the repository at this point in the history
  • Loading branch information
DecwLK committed Mar 19, 2024
1 parent fa23417 commit f4e5f53
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.geometry.Point2D;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
Expand Down Expand Up @@ -88,6 +89,8 @@ private void constructVisualization() {
container.getChildren().add(rectangle);
Label label = new Label();
label.textProperty().bind(nameProperty);
label.setMaxWidth(portViewModel.getSize().getX());
label.setAlignment(Pos.CENTER);
container.getChildren().add(label);
getChildren().add(container);
}
Expand Down

0 comments on commit f4e5f53

Please sign in to comment.