mirror of https://github.com/pyodide/pyodide.git
Merge pull request #314 from madhur-tandon/master
Align the matplotlib Figure and Buttons Toolbar to the center.
This commit is contained in:
commit
a38bf8af9b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue