Skip to content

Commit

Permalink
fix: graph crash, when there is no panelBuilder.
Browse files Browse the repository at this point in the history
  • Loading branch information
CorvusYe committed Mar 29, 2024
1 parent 1a73651 commit ab095ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.2.4+1
- fix: graph crash, when there is no panelBuilder.

## 0.2.4
- feat: synchronously update panel positions, when dragging nodes.

Expand Down
6 changes: 4 additions & 2 deletions lib/widgets/vertex_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ class VertexComponent extends ShapeComponent
}

onDrag(DragUpdateInfo e) {
gameRef.overlays.remove(overlayName);
gameRef.overlays.add(overlayName);
if (hasPanel) {
gameRef.overlays.remove(overlayName);
gameRef.overlays.add(overlayName);
}
}

@override
Expand Down

0 comments on commit ab095ce

Please sign in to comment.