double y = (e.getY() - lastPoint.getY()) / scale;
lastPoint = e.getPoint();
x = rect.getX() + ((x > 0) ? rect.getWidth() : 0) + x;
y = rect.getY() + ((y > 0) ? rect.getHeight() : 0) + y;
Point2D pt = new Point2D.Double(x, y);
graph.scrollPointToVisible(pt);
navigatorPane.repaint();
}
}
}