0
Fork 0
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:
Andrey Antukh 2020-03-19 17:39:53 +01:00 committed by Alonso Torres
parent 9d8dffa80b
commit 1434cb62f5

View file

@ -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)))