Merge pull request #746 from ma-laforge/inspectdr

Layout fix: Update plot.bb in _update_plot_object.
This commit is contained in:
Michael Krabbe Borregaard 2017-04-18 20:55:21 +02:00 committed by GitHub
commit 2c5a37d38e

View File

@ -411,8 +411,6 @@ function _before_layout_calcs(plt::Plot{InspectDRBackend})
plot = sp.o plot = sp.o
_initialize_subplot(plt, sp) _initialize_subplot(plt, sp)
_inspectdr_setupsubplot(sp) _inspectdr_setupsubplot(sp)
graphbb = _inspectdr_to_pixels(plotarea(sp))
plot.plotbb = InspectDR.plotbounds(plot.layout, graphbb)
# add the annotations # add the annotations
for ann in sp[:annotations] for ann in sp[:annotations]
@ -467,7 +465,11 @@ function _update_plot_object(plt::Plot{InspectDRBackend})
mplot = _inspectdr_getmplot(plt.o) mplot = _inspectdr_getmplot(plt.o)
if nothing == mplot; return; end if nothing == mplot; return; end
#TODO: should plotbb be computed here?? for (i, sp) in enumerate(plt.subplots)
graphbb = _inspectdr_to_pixels(plotarea(sp))
plot = mplot.subplots[i]
plot.plotbb = InspectDR.plotbounds(plot.layout, graphbb)
end
gplot = _inspectdr_getgui(plt.o) gplot = _inspectdr_getgui(plt.o)
if nothing == gplot; return; end if nothing == gplot; return; end