@@ -345,26 +345,27 @@ def send_event(self, event_type, **kwargs):
345345 self .manager ._send_event (event_type , ** kwargs )
346346
347347
348- _JQUERY_ICON_CLASSES = {
349- 'home' : 'ui-icon ui-icon-home' ,
350- 'back' : 'ui-icon ui-icon-circle-arrow-w' ,
351- 'forward' : 'ui-icon ui-icon-circle-arrow-e' ,
352- 'zoom_to_rect' : 'ui-icon ui-icon-search ' ,
353- 'move' : 'ui-icon ui-icon-arrow-4 ' ,
354- 'download' : 'ui-icon ui-icon-disk' ,
355- None : None ,
348+ _ALLOWED_TOOL_ITEMS = {
349+ 'home' ,
350+ 'back' ,
351+ 'forward' ,
352+ 'pan ' ,
353+ 'zoom ' ,
354+ 'download' ,
355+ None ,
356356}
357357
358358
359359class NavigationToolbar2WebAgg (backend_bases .NavigationToolbar2 ):
360360
361361 # Use the standard toolbar items + download button
362- toolitems = [(text , tooltip_text , _JQUERY_ICON_CLASSES [image_file ],
363- name_of_method )
364- for text , tooltip_text , image_file , name_of_method
365- in (backend_bases .NavigationToolbar2 .toolitems +
366- (('Download' , 'Download plot' , 'download' , 'download' ),))
367- if image_file in _JQUERY_ICON_CLASSES ]
362+ toolitems = [
363+ (text , tooltip_text , image_file , name_of_method )
364+ for text , tooltip_text , image_file , name_of_method
365+ in (* backend_bases .NavigationToolbar2 .toolitems ,
366+ ('Download' , 'Download plot' , 'filesave' , 'download' ))
367+ if name_of_method in _ALLOWED_TOOL_ITEMS
368+ ]
368369
369370 def _init_toolbar (self ):
370371 self .message = ''
0 commit comments