mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
🐛 Fix remove color button in the gradient editor (#6942)
This commit is contained in:
parent
4effd375a9
commit
d46b519524
3 changed files with 5 additions and 5 deletions
|
@ -43,6 +43,7 @@
|
|||
- Fix duplicating pages with mainInstance shapes nested inside groups [Taiga #10774](https://tree.taiga.io/project/penpot/issue/10774)
|
||||
- Fix ESC key not closing Add/Manage Libraries modal [Taiga #11523](https://tree.taiga.io/project/penpot/issue/11523)
|
||||
- Fix copying a shadow color from info tab [Taiga #11211](https://tree.taiga.io/project/penpot/issue/11211)
|
||||
- Fix remove color button in the gradient editor [Taiga #11623](https://tree.taiga.io/project/penpot/issue/11623)
|
||||
|
||||
## 2.8.1 (Unreleased)
|
||||
|
||||
|
|
|
@ -276,10 +276,9 @@
|
|||
handle-gradient-remove-stop
|
||||
(mf/use-fn
|
||||
(mf/deps state)
|
||||
(fn [stop]
|
||||
(fn [index]
|
||||
(when (> (count (:stops state)) 2)
|
||||
(when-let [index (d/index-of-pred (:stops state) #(= % stop))]
|
||||
(st/emit! (dc/remove-gradient-stop index))))))
|
||||
(st/emit! (dc/remove-gradient-stop index)))))
|
||||
|
||||
handle-stop-edit-start
|
||||
(mf/use-fn
|
||||
|
|
|
@ -80,10 +80,10 @@
|
|||
|
||||
handle-remove-stop
|
||||
(mf/use-callback
|
||||
(mf/deps on-remove-stop stop)
|
||||
(mf/deps on-remove-stop index)
|
||||
(fn []
|
||||
(when on-remove-stop
|
||||
(on-remove-stop stop))))
|
||||
(on-remove-stop index))))
|
||||
|
||||
handle-focus-stop-offset
|
||||
(mf/use-fn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue