Skip to content

Commit

Permalink
fix visibility issues with non-combined plots
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrumbiegel committed Mar 28, 2020
1 parent 89acca1 commit e9323bb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/primitives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,21 @@ function gr_draw(scene::Scene)
end
# The main method - this draws all plots and child scenes
function draw(scene::Scene)
foreach(plot-> draw(scene, plot), scene.plots)
foreach(child-> draw(child), scene.children)
for plot in scene.plots
if plot.visible[]
draw(scene, plot)
end
end
for child in scene.children
draw(child)
end
end
# The lower level method. This dispatches on primitives, meaning that
# we have some guarantees about their attributes.
function draw(scene::Scene, primitive::AbstractPlotting.Combined)
foreach(x-> draw(scene, x), filter(x -> x.visible[], primitive.plots))
for p in primitive.plots
if p.visible[]
draw(scene, p)
end
end
end

0 comments on commit e9323bb

Please sign in to comment.