def ms_zoom_in(self, viewer, event, data_x, data_y, msg=False):
        """Zoom in one level by a mouse click.
        """
        if not self.canzoom:
            return True

        if not (event.state == 'down'):
            return True

        with viewer.suppress_redraw:
            viewer.panset_xy(data_x, data_y)

            if self.settings.get('scroll_zoom_direct_scale', True):
                zoom_accel = self.settings.get('scroll_zoom_acceleration', 1.0)
                # change scale by 100%
                amount = self._scale_adjust(2.0, 15.0, zoom_accel, max_limit=4.0)
                self._scale_image(viewer, 0.0, amount, msg=msg)
            else:
                viewer.zoom_in()

            if hasattr(viewer, 'center_cursor'):
                viewer.center_cursor()
            if msg:
                viewer.onscreen_message(viewer.get_scale_text(),
                                        delay=1.0)
        return True
def ms_zoom_in ( self , viewer , event , data_x , data_y , msg = False ) : if not self . canzoom : return True if not ( event . state == 'down' ) : return True with viewer . suppress_redraw : viewer . panset_xy ( data_x , data_y ) if self . settings . get ( 'scroll_zoom_direct_scale' , True ) : zoom_accel = self . settings . get ( 'scroll_zoom_acceleration' , 1.0 ) amount = self . _scale_adjust ( 2.0 , 15.0 , zoom_accel , max_limit = 4.0 ) self . _scale_image ( viewer , 0.0 , amount , msg = msg ) else : viewer . zoom_in ( ) if hasattr ( viewer , 'center_cursor' ) : viewer . center_cursor ( ) if msg : viewer . onscreen_message ( viewer . get_scale_text ( ) , delay = 1.0 ) return True
Zoom in one level by a mouse click.