From 2352a5d8d6e21e6030652b98d4108ee7b1abe83d Mon Sep 17 00:00:00 2001 From: carrascomj Date: Wed, 13 Mar 2024 14:26:05 +0100 Subject: [PATCH] enhance: do not change z coordinate on drag --- src/aesthetics.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/aesthetics.rs b/src/aesthetics.rs index 34d5d0d..d6e03fb 100644 --- a/src/aesthetics.rs +++ b/src/aesthetics.rs @@ -853,8 +853,9 @@ fn follow_the_axes( for (axis_trans, axis) in axes.iter() { for (mut trans, hist) in hists.iter_mut() { if (axis.node_id == hist.node_id) & (hist.side == axis.side) { - trans.translation = axis_trans.translation; - trans.rotation = axis_trans.rotation; + // z has to be maintained per element in the axis to avoid flickering + trans.translation.x = axis_trans.translation.x; + trans.translation.y = axis_trans.translation.y; if hist.follow_scale { trans.scale.x = axis_trans.scale.x; }