Skip to content

Commit

Permalink
fix depth order in DataInspector
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Dec 7, 2023
1 parent 1498dfe commit 4495370
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/basic_recipes/tooltip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ end

function plot!(p::Tooltip{<:Tuple{<:VecTypes}})
# TODO align

# TODO Move transform_func + model from DataInspector in here?
# TODO (remove forced connection of model in that case, see end of function)
scene = parent_scene(p)
px_pos = map(scene.camera.projectionview, scene.camera.resolution, p[1]) do _, _, p
project(scene, p)
Expand Down Expand Up @@ -269,5 +270,13 @@ function plot!(p::Tooltip{<:Tuple{<:VecTypes}})

notify(p[1])

# TODO Force connect transform to allow depth translations to continue to apply
for plot in p.plots
if !isassigned(plot.transformation.parent)
obsfunc = connect!(transformation(p), transformation(plot))
append!(plot.deregister_callbacks, obsfunc)
end
end

return p
end

0 comments on commit 4495370

Please sign in to comment.