Add scale content to render wasm

This commit is contained in:
alonso.torres 2025-05-28 14:40:39 +02:00
parent 46b0e4f0e7
commit bcfa9a82ea
18 changed files with 282 additions and 33 deletions

View file

@ -6,6 +6,7 @@
(ns app.render-wasm.shape
(:require
[app.common.data.macros :as dm]
[app.common.transit :as t]
[app.common.types.shape :as shape]
[app.common.types.shape.layout :as ctl]
@ -132,6 +133,12 @@
:constraints-h (api/set-constraints-h v)
:constraints-v (api/set-constraints-v v)
(:r1 :r2 :r3 :r4)
(api/set-shape-corners [(dm/get-prop shape :r1)
(dm/get-prop shape :r2)
(dm/get-prop shape :r3)
(dm/get-prop shape :r4)])
:svg-attrs
(when (= (:type shape) :path)
(api/set-shape-path-attrs v))