def scroll_on_direction(self, x_direction, y_direction):
        """Scroll according to given directions.

        Directions are expected to be -1, 0 or 1.
        """
        dx = x_direction * SCROLL_SPEED
        dy = y_direction * SCROLL_SPEED

        self.scroll(dx, dy)
Scroll according to given directions.

        Directions are expected to be -1, 0 or 1.
        
nodezator/editing/gridlogic.py