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
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
- Fix issue with guides over shape handlers [Taiga #3032](https://tree.taiga.io/project/penpot/issue/3032)
|
- 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
|
## 1.12.1-beta
|
||||||
|
|
|
@ -160,14 +160,13 @@
|
||||||
(st/emit! (ms/->MouseEvent :click ctrl? shift? alt?))
|
(st/emit! (ms/->MouseEvent :click ctrl? shift? alt?))
|
||||||
|
|
||||||
(when (and hovering?
|
(when (and hovering?
|
||||||
(not shift?)
|
(or (not frame?) ctrl?)
|
||||||
(or ctrl? (not frame?))
|
|
||||||
(not @space?)
|
(not @space?)
|
||||||
(not selected?)
|
(not selected?)
|
||||||
(not edition)
|
(not edition)
|
||||||
(not drawing-path?)
|
(not drawing-path?)
|
||||||
(not drawing-tool))
|
(not drawing-tool))
|
||||||
(st/emit! (dw/select-shape (:id @hover)))))))))
|
(st/emit! (dw/select-shape (:id @hover) shift?))))))))
|
||||||
|
|
||||||
(defn on-double-click
|
(defn on-double-click
|
||||||
[hover hover-ids drawing-path? objects edition]
|
[hover hover-ids drawing-path? objects edition]
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
|
|
||||||
(hooks/use-stream
|
(hooks/use-stream
|
||||||
over-shapes-stream
|
over-shapes-stream
|
||||||
(mf/deps page-id objects @ctrl?)
|
(mf/deps page-id objects)
|
||||||
(fn [ids]
|
(fn [ids]
|
||||||
(let [is-group?
|
(let [is-group?
|
||||||
(fn [id]
|
(fn [id]
|
||||||
|
@ -178,15 +178,17 @@
|
||||||
|
|
||||||
selected (mf/ref-val selected-ref)
|
selected (mf/ref-val selected-ref)
|
||||||
|
|
||||||
|
ctrl? (mf/ref-val ctrl-ref)
|
||||||
|
|
||||||
remove-xfm (mapcat #(cph/get-parent-ids objects %))
|
remove-xfm (mapcat #(cph/get-parent-ids objects %))
|
||||||
remove-id? (cond-> (into #{} remove-xfm selected)
|
remove-id? (cond-> (into #{} remove-xfm selected)
|
||||||
:always
|
:always
|
||||||
(into (filter #(check-text-collision? objects (mf/ref-val raw-position-ref) %)) ids)
|
(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)
|
(into (filter #(group-empty-space? % objects ids)) ids)
|
||||||
|
|
||||||
@ctrl?
|
ctrl?
|
||||||
(into (filter is-group?) ids))
|
(into (filter is-group?) ids))
|
||||||
|
|
||||||
hover-shape (->> ids
|
hover-shape (->> ids
|
||||||
|
|
Loading…
Reference in a new issue