mirror of
https://github.com/penpot/penpot.git
synced 2025-06-02 20:31:39 +02:00
✨ Improved geometry for rects
This commit is contained in:
parent
23d531a664
commit
94c5004c33
7 changed files with 228 additions and 88 deletions
|
@ -85,7 +85,8 @@
|
|||
|
||||
;; If contains svg-attrs the origin is svg. If it's not svg origin
|
||||
;; we setup the default fill as transparent (instead of black)
|
||||
(not (contains? shape :svg-attrs))
|
||||
(and (not (contains? shape :svg-attrs))
|
||||
(not (= :svg-raw (:type shape))))
|
||||
{:fill "transparent"}
|
||||
|
||||
:else
|
||||
|
|
|
@ -84,12 +84,17 @@
|
|||
|
||||
(mf/defc svg-defs [{:keys [shape render-id]}]
|
||||
(let [svg-defs (:svg-defs shape)
|
||||
_ (when (:svg-transform shape) (.log js/console (str (:svg-transform shape))))
|
||||
transform (mf/use-memo
|
||||
(mf/deps shape)
|
||||
#(if (= :svg-raw (:type shape))
|
||||
(gmt/matrix)
|
||||
(usvg/svg-transform-matrix shape)))
|
||||
|
||||
;;transform (gmt/multiply
|
||||
;; transform
|
||||
;; (:svg-transform shape (gmt/matrix)))
|
||||
|
||||
prefix-id
|
||||
(fn [id]
|
||||
(cond->> id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue