Fix selecting upsidedown layers (#1560)
This commit is contained in:
parent
45de49fa03
commit
83116aa744
|
|
@ -22,7 +22,7 @@ impl ClickTarget {
|
||||||
/// Does the click target intersect the rectangle
|
/// Does the click target intersect the rectangle
|
||||||
pub fn intersect_rectangle(&self, document_quad: Quad, layer_transform: DAffine2) -> bool {
|
pub fn intersect_rectangle(&self, document_quad: Quad, layer_transform: DAffine2) -> bool {
|
||||||
// Check if the matrix is not invertible
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
let quad = layer_transform.inverse() * document_quad;
|
let quad = layer_transform.inverse() * document_quad;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue