Browse Source

#21 should be fixed

Kevin Trometer 8 years ago
parent
commit
5a3563bade
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/ui/view/UnitGraph.java

+ 2 - 2
src/ui/view/UnitGraph.java

@@ -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);