mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 08:11:30 -05:00
💄 Many cosmetic and indentation changes on outlines component
This commit is contained in:
parent
1477837cbf
commit
c3f67e6358
1 changed files with 24 additions and 22 deletions
|
@ -76,6 +76,11 @@
|
|||
:zoom zoom
|
||||
:color color}])))
|
||||
|
||||
(defn- show-outline?
|
||||
[shape]
|
||||
(and (not (:hidden shape))
|
||||
(not (:blocked shape))))
|
||||
|
||||
(mf/defc shape-outlines
|
||||
{::mf/wrap-props false}
|
||||
[props]
|
||||
|
@ -87,12 +92,10 @@
|
|||
edition (obj/get props "edition")
|
||||
zoom (obj/get props "zoom")
|
||||
|
||||
outlines-ids (set/union selected hover)
|
||||
show-outline? (fn [shape] (and (not (:hidden shape))
|
||||
(not (:blocked shape))))
|
||||
outlines (set/union selected hover)
|
||||
|
||||
shapes (d/concat-set
|
||||
(->> outlines-ids
|
||||
(->> outlines
|
||||
(filter #(not= edition %))
|
||||
(map #(get objects %))
|
||||
(filterv show-outline?)
|
||||
|
@ -103,5 +106,4 @@
|
|||
(map #(get objects %))
|
||||
(filter some?)))]
|
||||
[:g.outlines
|
||||
[:& shape-outlines-render {:shapes shapes
|
||||
:zoom zoom}]]))
|
||||
[:& shape-outlines-render {:shapes shapes :zoom zoom}]]))
|
||||
|
|
Loading…
Add table
Reference in a new issue