mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 13:18:21 +02:00
Remodeled the mouse position <-> canvas coords matching.
This commit is contained in:
parent
f8a6342b98
commit
beda689dfc
3 changed files with 168 additions and 149 deletions
|
@ -33,6 +33,7 @@
|
|||
(defn viewport-render
|
||||
[own]
|
||||
(let [workspace (rum/react wb/workspace-state)
|
||||
page (rum/react wb/page-state)
|
||||
drawing? (:drawing workspace)
|
||||
zoom 1]
|
||||
(html
|
||||
|
@ -41,8 +42,8 @@
|
|||
:on-click #(on-click % workspace)
|
||||
:class (when drawing? "drawing")}
|
||||
[:g.zoom {:transform (str "scale(" zoom ", " zoom ")")}
|
||||
(canvas)
|
||||
#_(grid zoom)]])))
|
||||
(if page
|
||||
(canvas page))]])))
|
||||
|
||||
(def viewport
|
||||
(util/component
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue