mirror of
https://github.com/penpot/penpot.git
synced 2025-05-11 05:16:37 +02: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]
|
[cuerdas.core :as str]
|
||||||
[beicon.core :as rx]
|
[beicon.core :as rx]
|
||||||
[cuerdas.core :as str]
|
[cuerdas.core :as str]
|
||||||
|
[uxbox.util.geom.point :as gpt]
|
||||||
[uxbox.util.blob :as blob]))
|
[uxbox.util.blob :as blob]))
|
||||||
|
|
||||||
;; --- Deprecated methods
|
;; --- Deprecated methods
|
||||||
|
@ -135,4 +136,14 @@
|
||||||
[el query]
|
[el query]
|
||||||
(.querySelector 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
Add a link
Reference in a new issue