mirror of
https://github.com/penpot/penpot.git
synced 2025-03-20 19:51:23 -05:00
Improve point transit handlers.
This commit is contained in:
parent
60fc30b709
commit
c1591d85cb
1 changed files with 3 additions and 6 deletions
|
@ -25,15 +25,12 @@
|
|||
(def point-write-handler
|
||||
(t/write-handler
|
||||
(constantly "point")
|
||||
(fn [v]
|
||||
(let [ret #js []]
|
||||
(.push ret (:x v))
|
||||
(.push ret (:y v))
|
||||
ret))))
|
||||
(fn [v] (into {} v))))
|
||||
|
||||
(def point-read-handler
|
||||
(t/read-handler
|
||||
#(gpt/point (js->clj %))))
|
||||
(fn [value]
|
||||
(gpt/map->Point value))))
|
||||
|
||||
(def ^:privare +read-handlers+
|
||||
{"u" uuid
|
||||
|
|
Loading…
Add table
Reference in a new issue