mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 16:00:19 -05:00
Fix bug related to scroll handling and shapes/icons insertion.
This commit is contained in:
parent
6ecec4af0a
commit
18ff6303df
1 changed files with 2 additions and 1 deletions
|
@ -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…
Reference in a new issue