Give frames that are components more priority on selection

This commit is contained in:
Andrés Moya 2023-04-25 11:20:24 +02:00
parent 4ddd3811b2
commit 7c612d8bcf
2 changed files with 19 additions and 15 deletions

View file

@ -11,6 +11,7 @@
[app.common.geom.shapes :as gsh]
[app.common.pages :as cp]
[app.common.pages.helpers :as cph]
[app.common.types.component :as ctk]
[app.common.types.shape-tree :as ctt]
[app.common.uuid :as uuid]
[app.main.data.shortcuts :as dsc]
@ -221,7 +222,10 @@
root-frame-with-data?
#(as-> (get objects %) obj
(and (cph/root-frame? obj) (d/not-empty? (:shapes obj))))
(and (cph/root-frame? obj)
(d/not-empty? (:shapes obj))
(not (ctk/instance-root? obj))
(not (ctk/main-instance? obj))))
;; Set with the elements to remove from the hover list
remove-id-xf