Fixed ellipse hit test if sizes are negative (#205)

This commit is contained in:
Timur Khazamov 2020-01-06 23:06:54 +05:00 committed by GitHub
parent d0365933a9
commit 7bf0184499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,8 +27,8 @@ export function hitTest(
let tx = 0.707;
let ty = 0.707;
const a = element.width / 2;
const b = element.height / 2;
const a = Math.abs(element.width) / 2;
const b = Math.abs(element.height) / 2;
[0, 1, 2, 3].forEach(x => {
const xx = a * tx;