mirror of
https://github.com/penpot/penpot.git
synced 2025-03-10 14:51:37 -05:00
🐛 Fix problem with inner strokes bounds
This commit is contained in:
parent
1fb21d537c
commit
83d8bf37a6
1 changed files with 5 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
|||
[app.common.data.macros :as dm]
|
||||
[app.common.files.helpers :as cfh]
|
||||
[app.common.geom.rect :as grc]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
[app.common.math :as mth]))
|
||||
|
||||
(defn shape-stroke-margin
|
||||
|
@ -97,12 +98,15 @@
|
|||
([shape ignore-margin?]
|
||||
(let [strokes (:strokes shape)
|
||||
|
||||
open-path? (and ^boolean (cfh/path-shape? shape)
|
||||
^boolean (gsh/open-path? shape))
|
||||
|
||||
stroke-width
|
||||
(->> strokes
|
||||
(map #(case (get % :stroke-alignment :center)
|
||||
:center (/ (:stroke-width % 0) 2)
|
||||
:outer (:stroke-width % 0)
|
||||
(:stroke-width % 0)))
|
||||
(if open-path? (:stroke-width % 0) 0)))
|
||||
(reduce d/max 0))
|
||||
|
||||
stroke-margin
|
||||
|
|
Loading…
Add table
Reference in a new issue