|
@@ -250,8 +250,8 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
|
|
|
y = this.getHeight() / scaleY;
|
|
|
}
|
|
|
// x
|
|
|
- if (tempP == pointList.getFirst() || tempP == pointList.getLast() || pointList.get(i + 1).getX() < x
|
|
|
- || pointList.get(i - 1).getX() > x) {
|
|
|
+ if (tempP == pointList.getFirst() || tempP == pointList.getLast() || pointList.get(i + 1).getX() < x+3
|
|
|
+ || pointList.get(i - 1).getX() > x-3 || pointList.getFirst().getX() > x-3 || pointList.getLast().getX() < x+3) {
|
|
|
x = tempP.getX();
|
|
|
}
|
|
|
tempP.setLocation(x, y);
|