Skip to content

Commit

Permalink
fix issue #204 by initializing canvas dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed Aug 9, 2024
1 parent 456845e commit 31a0032
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public CanvasController(AppState app, Canvas canvas) {
this.canvas = canvas;
this.model = app.getCanvasModel();

// initialize dimensions of canvas
model.setCanvasDimension(new Dimension(canvas.getWidth(), canvas.getHeight()));

// listen to model
model.addPropertyChangeListener(this);
model.getShapeManager().addPropertyChangeListener(this);
Expand Down

0 comments on commit 31a0032

Please sign in to comment.