mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
🐛 Fix problem with double click
This commit is contained in:
parent
96facc5100
commit
aed6a8a5ff
2 changed files with 16 additions and 11 deletions
|
@ -36,6 +36,7 @@
|
||||||
- Fixed handoff shadow type text [Taiga #2717](https://tree.taiga.io/project/penpot/issue/2717)
|
- Fixed handoff shadow type text [Taiga #2717](https://tree.taiga.io/project/penpot/issue/2717)
|
||||||
- Fixed components get "dirty" marker when moved [Taiga #2764](https://tree.taiga.io/project/penpot/issue/2764)
|
- Fixed components get "dirty" marker when moved [Taiga #2764](https://tree.taiga.io/project/penpot/issue/2764)
|
||||||
- Fixed cannot align objects in a group that is not part of a frame [Taiga #2762](https://tree.taiga.io/project/penpot/issue/2762)
|
- Fixed cannot align objects in a group that is not part of a frame [Taiga #2762](https://tree.taiga.io/project/penpot/issue/2762)
|
||||||
|
- Fix problem with double click on exit path editing [Taiga #2906](https://tree.taiga.io/project/penpot/issue/2906)
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
|
|
||||||
|
|
|
@ -186,19 +186,23 @@
|
||||||
|
|
||||||
(st/emit! (ms/->MouseEvent :double-click ctrl? shift? alt?))
|
(st/emit! (ms/->MouseEvent :double-click ctrl? shift? alt?))
|
||||||
|
|
||||||
(when (and (not drawing-path?) shape)
|
;; Emit asynchronously so the double click to exit shapes won't break
|
||||||
(cond frame?
|
(timers/schedule
|
||||||
(st/emit! (dw/select-shape id shift?))
|
#(when (and (not drawing-path?) shape)
|
||||||
|
(cond
|
||||||
|
frame?
|
||||||
|
(st/emit! (dw/select-shape id shift?))
|
||||||
|
|
||||||
(and group? (> (count @hover-ids) 1))
|
(and group? (> (count @hover-ids) 1))
|
||||||
(let [selected (get objects (second @hover-ids))]
|
(let [selected (get objects (second @hover-ids))]
|
||||||
(reset! hover selected)
|
(reset! hover selected)
|
||||||
(reset! hover-ids (into [] (rest @hover-ids)))
|
(reset! hover-ids (into [] (rest @hover-ids)))
|
||||||
(st/emit! (dw/select-shape (:id selected))))
|
|
||||||
|
|
||||||
(not= id edition)
|
(st/emit! (dw/select-shape (:id selected))))
|
||||||
(st/emit! (dw/select-shape id)
|
|
||||||
(dw/start-editing-selected))))))))
|
(not= id edition)
|
||||||
|
(st/emit! (dw/select-shape id)
|
||||||
|
(dw/start-editing-selected)))))))))
|
||||||
|
|
||||||
(defn on-context-menu
|
(defn on-context-menu
|
||||||
[hover hover-ids]
|
[hover hover-ids]
|
||||||
|
|
Loading…
Reference in a new issue