Skip to content

Commit 7219234

Browse files
committed
Delete an shape node from a shape scene
1 parent ffd6022 commit 7219234

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/com/easternedgerobotics/rov/fx/distance/ShapeScene.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ public void add(final ShapeNode node, final double containerX, final double cont
6262
draw(node);
6363
}
6464

65+
public void remove(final ShapeNode node) {
66+
children.remove(node);
67+
stack.getChildren().removeAll(node.getDrawnShapes());
68+
draw();
69+
}
70+
6571
/**
6672
* Set up movement subscriptions for the node and add drawables to the scene.
6773
*

0 commit comments

Comments
 (0)