Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(clicking): handle negative area results in computeQuadArea (#3413)
This patch fixes a case in which computeQuadArea calculates the area size correctly, but returns the area as a negative number. This occurs when DOM.getContentQuads returns quads in a specific order. E.g. the array: [ { x: 463, y: 68.5 },{ x: 437, y: 68.5 },{ x: 437, y: 94.5 },{ x: 463, y: 94.5 } ] will receive area size of -676.
- Loading branch information
1 parent
fae441c
commit 81edbbb
Showing
3 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Rotated button test</title> | ||
</head> | ||
<body> | ||
<script src="mouse-helper.js"></script> | ||
<button onclick="clicked();">Click target</button> | ||
<style> | ||
button { | ||
transform: rotateY(180deg); | ||
} | ||
</style> | ||
<script> | ||
window.result = 'Was not clicked'; | ||
function clicked() { | ||
result = 'Clicked'; | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters