Improved performance of refs

This commit is contained in:
alonso.torres 2022-04-01 11:21:50 +02:00
parent e62f0603b5
commit 0bb20197f1
7 changed files with 67 additions and 124 deletions

View file

@ -18,6 +18,7 @@
[app.main.data.workspace.path.shortcuts]
[app.main.data.workspace.shortcuts]
[app.main.store :as st]
[app.util.dom :as dom]
[app.util.object :as obj]
[app.util.timers :as timers]
[beicon.core :as rx]
@ -340,3 +341,9 @@
(.log js/console "%c Viewer" style)
(print-shortcuts app.main.data.viewer.shortcuts/shortcuts)))
nil)
(defn ^:export nodeStats
[]
(let [root-node (dom/query ".viewport .render-shapes")
num-nodes (->> (dom/seq-nodes root-node) count)]
#js {:number num-nodes}))