daybrush/overlap-area

Overlap incorrect when element is slightly offscreen

AlexxIV opened this issue · 1 comments

Hi,

I've came across this issue while testing selecto and found out that it uses the overlap area under the hood for hitRate calculations.
The problem is when you have an element which is 1 pixel of the viewport.

Normal behavior:
image

Bug:
image

On the second image the box is translated exactly 1px away from the viewbox and cannot be properly selected anymore

@AlexxIV

Can you give me a demo like code sandbox or stackblitz?