mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
commit
4251551535
2 changed files with 14 additions and 2 deletions
|
@ -77,6 +77,12 @@
|
||||||
|
|
||||||
(def dimensions-keys (schema-keys ::dimensions))
|
(def dimensions-keys (schema-keys ::dimensions))
|
||||||
|
|
||||||
|
(sm/def! ::opacity
|
||||||
|
[:map
|
||||||
|
[:opacity ::sm/uuid]])
|
||||||
|
|
||||||
|
(def opacity-keys (schema-keys ::opacity))
|
||||||
|
|
||||||
(sm/def! ::spacing
|
(sm/def! ::spacing
|
||||||
[:map
|
[:map
|
||||||
[:spacing-column {:optional true} ::sm/uuid]
|
[:spacing-column {:optional true} ::sm/uuid]
|
||||||
|
|
|
@ -67,8 +67,12 @@
|
||||||
(dwt/update-dimensions shape-ids :width value)
|
(dwt/update-dimensions shape-ids :width value)
|
||||||
(dwt/update-dimensions shape-ids :height value)))
|
(dwt/update-dimensions shape-ids :height value)))
|
||||||
|
|
||||||
(defn update-layout-spacing-column [value shape-ids]
|
(defn update-opacity [value shape-ids]
|
||||||
(let [selected-shapes (wsh/lookup-selected @st/state)]
|
(st/emit!
|
||||||
|
(dch/update-shapes shape-ids #(assoc % :opacity value))))
|
||||||
|
|
||||||
|
(defn update-layout-spacing-column [value _shape-ids]
|
||||||
|
(let [selected-shapes (wsh/lookup-selected @st/state)]
|
||||||
(st/emit!
|
(st/emit!
|
||||||
(dwsl/update-layout selected-shapes {:layout-gap {:column-gap value :row-gap value}}))))
|
(dwsl/update-layout selected-shapes {:layout-gap {:column-gap value :row-gap value}}))))
|
||||||
|
|
||||||
|
@ -112,6 +116,8 @@
|
||||||
:key :numeric}]}}]
|
:key :numeric}]}}]
|
||||||
[:opacity
|
[:opacity
|
||||||
{:title "Opacity"
|
{:title "Opacity"
|
||||||
|
:attributes ctt/opacity-keys
|
||||||
|
:on-update-shape update-opacity
|
||||||
:modal {:key :tokens/opacity
|
:modal {:key :tokens/opacity
|
||||||
:fields [{:label "Opacity"
|
:fields [{:label "Opacity"
|
||||||
:key :opacity}]}}]
|
:key :opacity}]}}]
|
||||||
|
|
Loading…
Reference in a new issue