Tom Troppmann 6 rokov pred
rodič
commit
2f2898c375
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      src/ui/view/UnitGraph.java

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

@@ -105,6 +105,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
         {
         	 drawUnitGraphPoints(g2D);
         }
+        g2D.setColor(dotColor);
         g2D.setStroke(new BasicStroke(1));
         drawCurrentIterartionLine(g2D);
     }
@@ -114,7 +115,7 @@ public class UnitGraph extends JPanel implements MouseListener, MouseMotionListe
     {
     	int cur = model.getCurIteration();
     	int max = model.getIterations();
-    	double where = ((double) cur)/((double) max);
+    	double where = ((double) cur)/((double) max - 1);
     	Position oben = new Position(border + (int)(where * widthWithBorder), 0);
     	Position unten = new Position(border + (int)(where * widthWithBorder), 2 * border + heightWithBorder);
     	drawLine(g,oben,unten);