0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 17:21:17 -05:00

🐛 Fix add fill and stroke color from palette to groups and components

This commit is contained in:
eva 2022-01-04 15:58:19 +01:00 committed by Alonso Torres
parent 7bbf98dfb1
commit f5cfbce1c2
2 changed files with 8 additions and 8 deletions

View file

@ -17,8 +17,9 @@
### :bug: Bugs fixed
- Fix default project name in all languages [Taiga #2280](https://tree.taiga.io/project/penpot/issue/2280)
- Fix line-height and letter-spacing inputs to allow negative values [Taiga #2381](https://tree.taiga.io/project/penpot/issue/2381)
- Fix add fill color from palette to groups and components [Taiga #2313](https://tree.taiga.io/project/penpot/issue/2313).
- Fix default project name in all languages [Taiga #2280](https://tree.taiga.io/project/penpot/issue/2280).
- Fix line-height and letter-spacing inputs to allow negative values [Taiga #2381](https://tree.taiga.io/project/penpot/issue/2381).
- Fix typo in Handoff tooltip [Taiga #2428](https://tree.taiga.io/project/penpot/issue/2428).
- Fix crash when pressing Shift+1 on empty file [#1435](https://github.com/penpot/penpot/issues/1435).
- Fix masked group resize strange behavior [Taiga #2317](https://tree.taiga.io/project/penpot/issue/2317).

View file

@ -8,7 +8,6 @@
(:require
[app.common.math :as mth]
[app.main.data.workspace.colors :as mdc]
[app.main.data.workspace.state-helpers :as wsh]
[app.main.refs :as refs]
[app.main.store :as st]
[app.main.ui.components.color-bullet :as cb]
@ -40,12 +39,12 @@
;; --- Components
(mf/defc palette-item
[{:keys [color size]}]
(let [select-color
(let [ids-with-children (map :id (mf/deref refs/selected-shapes-with-children))
select-color
(fn [event]
(let [ids (wsh/lookup-selected @st/state)]
(if (kbd/alt? event)
(st/emit! (mdc/change-stroke ids (merge uc/empty-color color)))
(st/emit! (mdc/change-fill ids (merge uc/empty-color color))))))]
(if (kbd/alt? event)
(st/emit! (mdc/change-stroke ids-with-children (merge uc/empty-color color)))
(st/emit! (mdc/change-fill ids-with-children (merge uc/empty-color color)))))]
[:div.color-cell {:class (str "cell-"(name size))
:on-click select-color}