0
Fork 0
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:
Andrey Antukh 2016-11-13 17:21:02 +01:00
parent 60fc30b709
commit c1591d85cb
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -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