From 9e6db257cc579ad61982c7a158106379be2f667d Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Tue, 20 Feb 2024 12:10:46 +0100 Subject: [PATCH] :bug: Fix problem with strokes and rects --- common/src/app/common/geom/shapes/bounds.cljc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/geom/shapes/bounds.cljc b/common/src/app/common/geom/shapes/bounds.cljc index 854d24440..6e7002f9d 100644 --- a/common/src/app/common/geom/shapes/bounds.cljc +++ b/common/src/app/common/geom/shapes/bounds.cljc @@ -17,7 +17,7 @@ (if (cfh/path-shape? shape) ;; TODO: Calculate with the stroke offset (not implemented yet) (+ stroke-width (mth/sqrt (* 2 stroke-width stroke-width))) - (- (mth/sqrt (* 2 stroke-width stroke-width)) stroke-width))) + (mth/sqrt (* 2 stroke-width stroke-width)))) (defn- apply-filters [attr type filters] @@ -153,6 +153,7 @@ (get-object-bounds objects shape nil)) ([objects shape {:keys [ignore-margin?] :or {ignore-margin? true}}] (let [base-bounds (calculate-base-bounds shape ignore-margin?) + _ (prn ">" (:name shape) base-bounds) bounds (cond (or (empty? (:shapes shape))