Improved mouse collision detection for groups and text shapes

This commit is contained in:
alonso.torres 2022-02-09 11:11:45 +01:00 committed by Andrés Moya
parent 0d48c758df
commit c5c0b36f28
5 changed files with 44 additions and 4 deletions

View file

@ -257,6 +257,13 @@
:width (.-width ^js rect)
:height (.-height ^js rect)}))
(defn bounding-rect->rect
[{:keys [left top width height]}]
{:x left
:y top
:width width
:height height})
(defn get-window-size
[]
{:width (.-innerWidth ^js js/window)