mirror of
https://github.com/penpot/penpot.git
synced 2026-04-29 05:08:08 +00:00
🎉 Add many helpers to uxbox.util.dom ns.
This commit is contained in:
parent
9d8dffa80b
commit
1434cb62f5
@ -14,6 +14,7 @@
|
||||
[cuerdas.core :as str]
|
||||
[beicon.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
[uxbox.util.geom.point :as gpt]
|
||||
[uxbox.util.blob :as blob]))
|
||||
|
||||
;; --- Deprecated methods
|
||||
@ -135,4 +136,14 @@
|
||||
[el query]
|
||||
(.querySelector el query))
|
||||
|
||||
(defn get-client-position
|
||||
[event]
|
||||
(let [x (.-clientX event)
|
||||
y (.-clientY event)]
|
||||
(gpt/point x y)))
|
||||
|
||||
(defn get-offset-position
|
||||
[event]
|
||||
(let [x (.-offsetX event)
|
||||
y (.-offsetY event)]
|
||||
(gpt/point x y)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user