Merge pull request #314 from madhur-tandon/master

Align the matplotlib Figure and Buttons Toolbar to the center.
This commit is contained in:
Michael Droettboom 2019-02-04 11:22:39 -05:00 committed by GitHub
commit a38bf8af9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -132,7 +132,10 @@ class FigureCanvasWasm(backend_agg.FigureCanvasAgg):
width *= self._ratio
height *= self._ratio
div = self.create_root_element()
div.setAttribute('style', 'width: {}px'.format(width / self._ratio))
div.setAttribute(
'style', 'margin: 0 auto; text-align: center;' +
'width: {}px'.format(width / self._ratio)
)
div.id = self._id
# The top bar