Fix selecting upsidedown layers (#1560)

This commit is contained in:
0HyperCube authored and GitHub committed 2024-01-12 02:27:08 -08:00
1 parent 45de49fa03
commit 83116aa744
1 file changed
+1 -1
@@ -22,7 +22,7 @@ impl ClickTarget {
/// Does the click target intersect the rectangle
pub fn intersect_rectangle(&self, document_quad: Quad, layer_transform: DAffine2) -> bool {
// Check if the matrix is not invertible
if layer_transform.matrix2.determinant() <= std::f64::EPSILON {
if layer_transform.matrix2.determinant().abs() <= std::f64::EPSILON {
return false;
}
let quad = layer_transform.inverse() * document_quad;