소스 검색

#21 should be fixed

Kevin Trometer 8 년 전
부모
커밋
5a3563bade
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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);