diff --git a/src/sphere/globeaxis.jl b/src/sphere/globeaxis.jl index 139b88a9..3d765af1 100644 --- a/src/sphere/globeaxis.jl +++ b/src/sphere/globeaxis.jl @@ -332,6 +332,7 @@ tightlimits!(::GlobeAxis) = nothing # TODO implement!? By getting the bbox of t # This is where we override the stuff to make it our stuff. function Makie.plot!(axis::GlobeAxis, plot::Makie.AbstractPlot) + # deal with setting the transform_func correctly source = pop!(plot.kw, :source, axis.source) zlevel = pop!(plot.kw, :zlevel, 0) # @show plot.kw @@ -339,6 +340,8 @@ function Makie.plot!(axis::GlobeAxis, plot::Makie.AbstractPlot) trans = Makie.Transformation(transformfunc; get(plot.kw, :transformation, Attributes())...) plot.kw[:transformation] = trans + reset_limits = to_value(pop!(plot.kw, :reset_limits, true)) + Makie.plot!(axis.scene, plot) # reassign popped observables back to attributes, so that they can be called by the user... @@ -348,7 +351,7 @@ function Makie.plot!(axis::GlobeAxis, plot::Makie.AbstractPlot) # adjust the limit margins in those cases automatically. # However, for spheres, we want to keep user zoom level if possible. # Makie.needs_tight_limits(plot) && Makie.tightlimits!(axis) - if Makie.is_open_or_any_parent(axis.scene) + if Makie.is_open_or_any_parent(axis.scene) && reset_limits Makie.reset_limits!(axis) end return plot