mirror of
https://github.com/penpot/penpot.git
synced 2025-06-09 15:41:38 +02: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
|
(def point-write-handler
|
||||||
(t/write-handler
|
(t/write-handler
|
||||||
(constantly "point")
|
(constantly "point")
|
||||||
(fn [v]
|
(fn [v] (into {} v))))
|
||||||
(let [ret #js []]
|
|
||||||
(.push ret (:x v))
|
|
||||||
(.push ret (:y v))
|
|
||||||
ret))))
|
|
||||||
|
|
||||||
(def point-read-handler
|
(def point-read-handler
|
||||||
(t/read-handler
|
(t/read-handler
|
||||||
#(gpt/point (js->clj %))))
|
(fn [value]
|
||||||
|
(gpt/map->Point value))))
|
||||||
|
|
||||||
(def ^:privare +read-handlers+
|
(def ^:privare +read-handlers+
|
||||||
{"u" uuid
|
{"u" uuid
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue