I am using haxe 3.2 with html5 browsers as the runtime environment.
I am trying to check whether two rects overlap, one of which comes from getBoundingClientRect, the other I am trying to construct from a mouse position.
I've already discovered that ClientRect is deprecated. Haxe now has a class called DOMRect, but when I try to instantiate it, I get a "cannot be called" warning. I am using haxe 3.2
In the haxe source it seems that the constructor for this class returns void, which doesn't make a lot of sense. The name is also pretty dumb, because I might be making rects which have no relation to the DOM.
Is it not possible to instantiate this thing? If so, what is the point of it?
[Also this class seems wholly underdefined. A decent rect class should have methods for intersects(rect) and inside(point), and maybe some other goodies such as offset, inflate etc.]
Do I have to make an anonymous 'rect' or use a map of floats instead?
Thank you in advance