0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

🐛 Fix problem with strokes and rects

This commit is contained in:
alonso.torres 2024-02-20 12:10:46 +01:00 committed by Andrey Antukh
parent 21927fd54c
commit 9e6db257cc

View file

@ -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))