0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-06 12:01:19 -05:00

🐛 Fix padding values and add tooltip

This commit is contained in:
Eva 2023-01-16 14:36:29 +01:00 committed by Alonso Torres
parent 8892cebb6f
commit fb060cb806
3 changed files with 5 additions and 4 deletions

View file

@ -155,10 +155,10 @@
single? (= (count selected-shapes) 1)
has-group? (->> selected-shapes (d/seek cph/group-shape?))
is-group? (and single? has-group?)
has_component? (some true? (map ctc/instance-root? selected-shapes))
is_component? (and single? has_component?)]
has-component? (some true? (map ctc/instance-root? selected-shapes))
is-component? (and single? has-component?)]
(if (and (not is_component?) is-group?)
(if (and (not is-component?) is-group?)
(let [new-shape-id (uuid/next)
parent-id (:parent-id (first selected-shapes))
shapes-ids (:shapes (first selected-shapes))

View file

@ -52,7 +52,7 @@
{:p1 p1}
(= 4 (count (set values)))
{:p1 p1 :p2 p2 :p3 p3}
{:p1 p1 :p2 p2 :p3 p3 :p4 p4}
(and (= p1 p3) (= p2 p4))
{:p1 p1 :p3 p3}

View file

@ -68,6 +68,7 @@
[{:keys [padding type]}]
(let [values (fm/format-padding-margin-shorthand (vals padding))]
[:div.attributes-value
{:title (str (str/join "px " (vals values)) "px")}
(for [[k v] values]
[:span.items {:key (str type "-" k "-" v)} v "px"])]))