mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 14:28:11 +08:00
Fix selecting upsidedown layers (#1560)
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user