diff options
author | David Thompson <dthompson2@worcester.edu> | 2023-03-22 08:26:20 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2023-03-22 08:26:37 -0400 |
commit | 8e33682838640d0a3f4353f85f16b1045e27d859 (patch) | |
tree | 7372760a3aa5c71a75fd5220239ae4779703678d | |
parent | c64f3c4744449afaedf910c96a99a1139cd2c122 (diff) |
Refresh canvas on enter, not boot.
-rw-r--r-- | catbird/node-2d.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/catbird/node-2d.scm b/catbird/node-2d.scm index 9199536..a2e11f0 100644 --- a/catbird/node-2d.scm +++ b/catbird/node-2d.scm @@ -972,6 +972,9 @@ PADDING on all sides." #:observe? #t) (canvas #:accessor canvas #:init-thunk path:make-empty-canvas)) +(define-method (on-enter (c <canvas>)) + (refresh-painter c)) + ;; Width and height of canvas nodes default to the size of their ;; initial painter, or 0 if there isn't one. (define-method (default-width (c <canvas>)) @@ -1002,9 +1005,6 @@ PADDING on all sides." (path:scale (vec2 (/ w pw) (/ h ph)) p)))) (path:set-canvas-painter! (canvas c) p*))))) -(define-method (on-boot (c <canvas>)) - (refresh-painter c)) - (define-method ((setter canvas) (c <canvas>)) (next-method) (path:set-canvas-painter! (canvas c) (painter c))) |