mirror of
https://github.com/penpot/penpot.git
synced 2025-06-04 18:21:38 +02:00
🎉 Reimplement canvas as svg (instead of g+rect).
This commit is contained in:
parent
63a339dd31
commit
86ba4fd083
12 changed files with 442 additions and 152 deletions
|
@ -120,7 +120,7 @@
|
|||
result (geom/resize-shape :bottom-right shape' point lock?)
|
||||
scale (geom/calculate-scale-ratio shape' result)
|
||||
mtx (geom/generate-resize-matrix :bottom-right shape' scale)]
|
||||
(assoc shape :modifier-mtx mtx)))
|
||||
(assoc shape :resize-modifier mtx)))
|
||||
|
||||
(update-drawing [state point lock?]
|
||||
(update-in state [:workspace-local :drawing] resize-shape point lock?))]
|
||||
|
@ -273,11 +273,11 @@
|
|||
(rx/concat
|
||||
(rx/of dw/clear-drawing)
|
||||
(when (::initialized? shape)
|
||||
(let [modifier-mtx (:modifier-mtx shape)
|
||||
shape (if (gmt/matrix? modifier-mtx)
|
||||
(geom/transform shape modifier-mtx)
|
||||
(let [modifier (:resize-modifier shape)
|
||||
shape (if (gmt/matrix? modifier)
|
||||
(geom/transform shape modifier)
|
||||
shape)
|
||||
shape (dissoc shape ::initialized? :modifier-mtx)]
|
||||
shape (dissoc shape ::initialized? :resize-modifier)]
|
||||
;; Add & select the created shape to the workspace
|
||||
(rx/of dw/deselect-all
|
||||
(if (= :canvas (:type shape))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue