Add reader tag support for types path data

This commit is contained in:
Andrey Antukh 2025-07-25 09:01:57 +02:00
parent 61fe8e8d8e
commit 4d9e070bcd
2 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,6 @@
{penpot/inst app.common.time/inst
penpot/cron app.util.cron/cron
penpot/duration app.common.time/duration
penpot/path-data app.common.types.path/from-string
penpot/matrix app.common.geom.matrix/decode-matrix
penpot/point app.common.geom.point/decode-point}

View File

@ -451,6 +451,16 @@
(-pr-writer [this writer _]
(cljs.core/-write writer (str "#penpot/path-data \"" (.toString this) "\"")))))
#?(:clj
(defmethod print-method PathData
[o w]
(print-dup o w)))
#?(:clj
(defmethod print-dup PathData
[^PathData o ^java.io.Writer writer]
(.write writer (str "#penpot/path-data \"" (.toString o) "\""))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SCHEMA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;