mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 05:58:26 +02:00
🐛 Fix selecting children from hidden parent layers
This commit is contained in:
parent
6962e15b6d
commit
475ce08d3e
4 changed files with 24 additions and 5 deletions
|
@ -120,6 +120,16 @@
|
|||
(recur (conj result parent-id) parent-id)
|
||||
result))))
|
||||
|
||||
(defn hidden-parent?
|
||||
"Checks the parent for the hidden property"
|
||||
[objects shape-id]
|
||||
(let [parent-id (dm/get-in objects [shape-id :parent-id])]
|
||||
(cond
|
||||
(or (nil? parent-id) (nil? shape-id) (= shape-id uuid/zero) (= parent-id uuid/zero)) false
|
||||
(dm/get-in objects [parent-id :hidden]) true
|
||||
:else
|
||||
(recur objects parent-id))))
|
||||
|
||||
(defn get-parent-ids-with-index
|
||||
"Returns a tuple with the list of parents and a map with the position within each parent"
|
||||
[objects shape-id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue