8000 Merge pull request #23498 from anntzer/wc · matplotlib/matplotlib@d892257 · GitHub
[go: up one dir, main page]

Skip to content

Commit d892257

Browse files
authored
Merge pull request #23498 from anntzer/wc
Fix direct instantiation of webagg_core managers.
2 parents 862f85d + 9369769 commit d892257

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/backends/backend_webagg_core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def _timer_set_interval(self):
155155

156156

157157
class FigureCanvasWebAggCore(backend_agg.FigureCanvasAgg):
158+
manager_class = _api.classproperty(lambda cls: FigureManagerWebAgg)
158159
_timer_cls = TimerAsyncio
159160
# Webagg and friends having the right methods, but still
160161
# having bugs in practice. Do not advertise that it works until
@@ -426,7 +427,7 @@ def set_history_buttons(self):
426427

427428

428429
class FigureManagerWebAgg(backend_bases.FigureManagerBase):
429-
ToolbarCls = NavigationToolbar2WebAgg
430+
_toolbar2_class = ToolbarCls = NavigationToolbar2WebAgg
430431

431432
def __init__(self, canvas, num):
432433
self.web_sockets = set()

0 commit comments

Comments
 (0)
0