From 6c7909969e0697c460fee1dd4c17ed5c236c6f15 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 27 Dec 2022 07:18:47 -0500 Subject: node-2d: Fix width/height slots to be properly observed. --- catbird/node-2d.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/catbird/node-2d.scm b/catbird/node-2d.scm index b2c7d95..b845ad0 100644 --- a/catbird/node-2d.scm +++ b/catbird/node-2d.scm @@ -335,12 +335,18 @@ ;; can be used as a bounding box that doesn't take any ;; transformation matrix into consideration. (size #:getter size #:init-thunk make-null-rect) - (width #:accessor width #:init-keyword #:width #:watch? #t #:allocation #:virtual + (width #:accessor width + #:init-keyword #:width + #:observe? #t + #:allocation #:virtual #:slot-ref (lambda (node) (rect-width (size node))) #:slot-set! (lambda (node w) (set-rect-width! (size node) w) (expire-local-bounding-box node))) - (height #:accessor height #:init-keyword #:height #:watch? #t #:allocation #:virtual + (height #:accessor height + #:init-keyword #:height + #:observe? #t + #:allocation #:virtual #:slot-ref (lambda (node) (rect-height (size node))) #:slot-set! (lambda (node h) (set-rect-height! (size node) h) -- cgit v1.2.3