mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
🐛 Fix problem with shift+ctrl+click to select
This commit is contained in:
parent
aa6f82c31f
commit
5347409804
3 changed files with 8 additions and 6 deletions
|
@ -8,6 +8,7 @@
|
|||
### :bug: Bugs fixed
|
||||
|
||||
- Fix issue with guides over shape handlers [Taiga #3032](https://tree.taiga.io/project/penpot/issue/3032)
|
||||
- Fix problem with shift+ctrl+click to select [#1671](https://github.com/penpot/penpot/issues/1671)
|
||||
|
||||
|
||||
## 1.12.1-beta
|
||||
|
|
|
@ -160,14 +160,13 @@
|
|||
(st/emit! (ms/->MouseEvent :click ctrl? shift? alt?))
|
||||
|
||||
(when (and hovering?
|
||||
(not shift?)
|
||||
(or ctrl? (not frame?))
|
||||
(or (not frame?) ctrl?)
|
||||
(not @space?)
|
||||
(not selected?)
|
||||
(not edition)
|
||||
(not drawing-path?)
|
||||
(not drawing-tool))
|
||||
(st/emit! (dw/select-shape (:id @hover)))))))))
|
||||
(st/emit! (dw/select-shape (:id @hover) shift?))))))))
|
||||
|
||||
(defn on-double-click
|
||||
[hover hover-ids drawing-path? objects edition]
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
|
||||
(hooks/use-stream
|
||||
over-shapes-stream
|
||||
(mf/deps page-id objects @ctrl?)
|
||||
(mf/deps page-id objects)
|
||||
(fn [ids]
|
||||
(let [is-group?
|
||||
(fn [id]
|
||||
|
@ -178,15 +178,17 @@
|
|||
|
||||
selected (mf/ref-val selected-ref)
|
||||
|
||||
ctrl? (mf/ref-val ctrl-ref)
|
||||
|
||||
remove-xfm (mapcat #(cph/get-parent-ids objects %))
|
||||
remove-id? (cond-> (into #{} remove-xfm selected)
|
||||
:always
|
||||
(into (filter #(check-text-collision? objects (mf/ref-val raw-position-ref) %)) ids)
|
||||
|
||||
(not @ctrl?)
|
||||
(not ctrl?)
|
||||
(into (filter #(group-empty-space? % objects ids)) ids)
|
||||
|
||||
@ctrl?
|
||||
ctrl?
|
||||
(into (filter is-group?) ids))
|
||||
|
||||
hover-shape (->> ids
|
||||
|
|
Loading…
Reference in a new issue