mirror of
https://github.com/penpot/penpot.git
synced 2025-02-24 15:56:11 -05:00
🎉 Add many helpers to uxbox.util.dom ns.
This commit is contained in:
parent
9d8dffa80b
commit
1434cb62f5
1 changed files with 11 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue