From 83116aa744fcbec40539a4bc218ea1fe65c2e510 Mon Sep 17 00:00:00 2001 From: 0HyperCube <78500760+0HyperCube@users.noreply.github.com> Date: Fri, 12 Jan 2024 10:27:08 +0000 Subject: [PATCH] Fix selecting upsidedown layers (#1560) --- node-graph/gcore/src/graphic_element/renderer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-graph/gcore/src/graphic_element/renderer.rs b/node-graph/gcore/src/graphic_element/renderer.rs index 33e6020f..0f063eb9 100644 --- a/node-graph/gcore/src/graphic_element/renderer.rs +++ b/node-graph/gcore/src/graphic_element/renderer.rs @@ -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;