From ed22e2c6d1d365a0a5c666e082fedd6079759370 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 15 Feb 2023 15:17:50 +0100 Subject: [PATCH] :zap: Performance improvement --- common/src/app/common/types/shape_tree.cljc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/types/shape_tree.cljc b/common/src/app/common/types/shape_tree.cljc index e6a41b5d8..1968eb1ac 100644 --- a/common/src/app/common/types/shape_tree.cljc +++ b/common/src/app/common/types/shape_tree.cljc @@ -205,9 +205,8 @@ (defn all-frames-by-position [objects position] (->> (get-frames-ids objects) - (sort-z-index objects) - (filterv #(and position (gsh/has-point? (get objects %) position))))) - + (filter #(and position (gsh/has-point? (get objects %) position))) + (sort-z-index objects))) (defn top-nested-frame "Search for the top nested frame for positioning shapes when moving or creating.