mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 16:06:37 +02:00
🎉 Add first impl of wasm-friendly for Shape data structure
This commit is contained in:
parent
e7d7291947
commit
043c23899a
7 changed files with 300 additions and 78 deletions
|
@ -181,10 +181,12 @@
|
|||
[state name]
|
||||
(let [page-id (get state :current-page-id)
|
||||
objects (get-in state [:workspace-data :pages-index page-id :objects])
|
||||
result (or (d/seek (fn [[_ shape]] (= name (:name shape))) objects)
|
||||
result (or (d/seek (fn [shape] (= name (:name shape))) (vals objects))
|
||||
(get objects (uuid/uuid name)))]
|
||||
(logjs name result)
|
||||
nil))
|
||||
#_(logjs name result)
|
||||
result
|
||||
|
||||
#_nil))
|
||||
|
||||
(defn ^:export dump-object
|
||||
[name]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue