mirror of
https://github.com/penpot/penpot.git
synced 2025-02-06 06:18:32 -05:00
Minor cosmetic changes on canvas component.
This commit is contained in:
parent
a4fe43235b
commit
233a2969c6
1 changed files with 19 additions and 24 deletions
|
@ -129,30 +129,25 @@
|
||||||
shapes (rum/react wb/shapes-state)
|
shapes (rum/react wb/shapes-state)
|
||||||
page-width (:width page)
|
page-width (:width page)
|
||||||
page-height (:height page)]
|
page-height (:height page)]
|
||||||
(html
|
(letfn [(on-mouse-down [event]
|
||||||
[:svg.page-canvas
|
(dom/stop-propagation event)
|
||||||
{:x wb/document-start-x
|
(rs/emit! (dw/deselect-all)))
|
||||||
:y wb/document-start-y
|
(on-mouse-up [event]
|
||||||
:ref "canvas"
|
(dom/stop-propagation event)
|
||||||
:width page-width
|
(reset! wb/shapes-dragging? false))]
|
||||||
:height page-height
|
(html
|
||||||
|
[:svg.page-canvas {:x wb/document-start-x
|
||||||
:on-mouse-down
|
:y wb/document-start-y
|
||||||
(fn [event]
|
:ref "canvas"
|
||||||
(dom/stop-propagation event)
|
:width page-width
|
||||||
(rs/emit! (dw/deselect-all)))
|
:height page-height
|
||||||
|
:on-mouse-down on-mouse-down
|
||||||
:on-mouse-up
|
:on-mouse-up on-mouse-up}
|
||||||
(fn [event]
|
(background)
|
||||||
(dom/stop-propagation event)
|
(grid 1)
|
||||||
(reset! wb/shapes-dragging? false))
|
[:svg.page-layout {}
|
||||||
}
|
(for [item shapes]
|
||||||
(background)
|
(rum/with-key (shape item) (str (:id item))))]]))))
|
||||||
(grid 1)
|
|
||||||
|
|
||||||
[:svg.page-layout {}
|
|
||||||
(for [item shapes]
|
|
||||||
(rum/with-key (shape item) (str (:id item))))]])))
|
|
||||||
|
|
||||||
(def canvas
|
(def canvas
|
||||||
(util/component
|
(util/component
|
||||||
|
|
Loading…
Add table
Reference in a new issue