mirror of
https://github.com/penpot/penpot.git
synced 2026-09-13 15:38:38 +00:00
Fix bug related to scroll handling and shapes/icons insertion.
This commit is contained in:
parent
6ecec4af0a
commit
18ff6303df
@ -14,10 +14,11 @@
|
|||||||
(defn- on-click
|
(defn- on-click
|
||||||
[event wstate]
|
[event wstate]
|
||||||
(let [mousepos @wb/mouse-position
|
(let [mousepos @wb/mouse-position
|
||||||
|
scroll-top @wb/scroll-top
|
||||||
shape (:drawing wstate)]
|
shape (:drawing wstate)]
|
||||||
(when shape
|
(when shape
|
||||||
(let [props {:x (first mousepos)
|
(let [props {:x (first mousepos)
|
||||||
:y (second mousepos)
|
:y (+ (second mousepos) scroll-top)
|
||||||
:width 100
|
:width 100
|
||||||
:height 100}]
|
:height 100}]
|
||||||
(rs/emit!
|
(rs/emit!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user