🐛 Fix selecting children from hidden parent layers

This commit is contained in:
alonso.torres 2023-03-02 17:33:27 +01:00
parent 6962e15b6d
commit 475ce08d3e
4 changed files with 24 additions and 5 deletions

View file

@ -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]