diff --git a/src/main/java/com/github/creme332/controller/canvas/CanvasController.java b/src/main/java/com/github/creme332/controller/canvas/CanvasController.java index 0f2bac1..26c7a6c 100644 --- a/src/main/java/com/github/creme332/controller/canvas/CanvasController.java +++ b/src/main/java/com/github/creme332/controller/canvas/CanvasController.java @@ -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);