Merge pull request #1044 from jheinen/master

gr: defer the calculation of padding constraints
This commit is contained in:
Josef Heinen 2017-08-26 13:05:30 +02:00 committed by GitHub
commit 5f9aa2edc0

View File

@ -620,8 +620,9 @@ function _update_min_padding!(sp::Subplot{GRBackend})
sp.minpad = (leftpad, toppad, rightpad, bottompad) sp.minpad = (leftpad, toppad, rightpad, bottompad)
end end
function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas) function gr_display(sp::Subplot{GRBackend}, w, h, viewport_canvas)
_update_min_padding!(sp)
# the viewports for this subplot # the viewports for this subplot
viewport_subplot = gr_viewport_from_bbox(sp, bbox(sp), w, h, viewport_canvas) viewport_subplot = gr_viewport_from_bbox(sp, bbox(sp), w, h, viewport_canvas)
viewport_plotarea[:] = gr_viewport_from_bbox(sp, plotarea(sp), w, h, viewport_canvas) viewport_plotarea[:] = gr_viewport_from_bbox(sp, plotarea(sp), w, h, viewport_canvas)