Fix Axis3 frameline z-sorting in CairoMakie #4591
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
#4485 changed
zvalue2d
to readtransformation.model
instead oftransformation.translation
, which causes it to include changes made to model directly.Axis3
does that, so the results of plots underax.scene
changed.A few cases:
ax.blockscene
so they don't see the model change from Axis3. Instead of getting translated, they have their input shifted. So before and after they havezvalue2d() = 0
.ax.scene
. Previously they had a default translation of0
, now some other value based on the scenes model matrix. Since the scene centers its 3d boundingbox around 0, plots that have positive z values get shifted back and thus get azvalue2d < 0
ax.scene
and experience the same change as user plots. They end up at the same z value as them but earlier in thescene.plots
array, so they draw first.This pr should undo the change introduced in #4485 for CairoMakie by translating the frame lines plot instead of setting their data z-value to -10k.
Type of change
Checklist