Skip to content

Commit

Permalink
enhance: do not change z coordinate on drag
Browse files Browse the repository at this point in the history
  • Loading branch information
carrascomj committed Mar 13, 2024
1 parent 4f62401 commit 2352a5d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/aesthetics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2352a5d

Please sign in to comment.