(self, direction)
Handle zoom event, direction is positive if zooming in, otherwise
        negative.
Handle zoom event, direction is positive if zooming in, otherwise
        negative.
Handle zoom event direction is positive if zooming in otherwise negative .
def __handle_zoom(self, direction):
        """Handle zoom event, direction is positive if zooming in, otherwise
        negative."""
        if self.__zooming_in(direction):
            self.__reset_zoomout_limit()
        if self.__zoomout_limit_reached and self.__zooming_out(direction):
            return

        self.zoom += np.sign(direction) * self.scale_factor
        if self.zoom <= 0:
            self.__zoomout_limit_reached = True
            self.zoom += self.scale_factor
        else:
            self.setTransformationAnchor(self.AnchorUnderMouse)
            self.setTransform(QTransform().scale(self.zoom, self.zoom))
def __handle_zoom ( self , direction ) : if self . __zooming_in ( direction ) : self . __reset_zoomout_limit ( ) if self . __zoomout_limit_reached and self . __zooming_out ( direction ) : return self . zoom += np . sign ( direction ) * self . scale_factor if self . zoom <= 0 : self . __zoomout_limit_reached = True self . zoom += self . scale_factor else : self . setTransformationAnchor ( self . AnchorUnderMouse ) self . setTransform ( QTransform ( ) . scale ( self . zoom , self . zoom ) )