|
@@ -360,7 +360,7 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
|
|
// double p1, p2 um location der points zu bestimmen
|
|
// double p1, p2 um location der points zu bestimmen
|
|
double p1 = pointList.get(i - 1).getX();
|
|
double p1 = pointList.get(i - 1).getX();
|
|
double p2 = pointList.get(i).getX();
|
|
double p2 = pointList.get(i).getX();
|
|
- // Punkte hinzufügen, je nachdem ob true oder false
|
|
|
|
|
|
+ // Punkte hinzuf�gen, je nachdem ob true oder false
|
|
if (pointList.get(i - 1).getY() != 0 && pointList.get(i).getY() != 0) {
|
|
if (pointList.get(i - 1).getY() != 0 && pointList.get(i).getY() != 0) {
|
|
pointList.add(i, new Point((int) ((x + p2) / 2 + dist), (int) height - 1));
|
|
pointList.add(i, new Point((int) ((x + p2) / 2 + dist), (int) height - 1));
|
|
pointList.add(i, new Point((int) ((x + p2) / 2 + dist), 0));
|
|
pointList.add(i, new Point((int) ((x + p2) / 2 + dist), 0));
|
|
@@ -501,7 +501,7 @@ class UnitGraph extends JPanel implements MouseListener, MouseMotionListener, Co
|
|
isSwitch = false;
|
|
isSwitch = false;
|
|
isElement = true;
|
|
isElement = true;
|
|
MAXIMUM = selectedElement.get(selectedElement.size() - 1).getEnergy();
|
|
MAXIMUM = selectedElement.get(selectedElement.size() - 1).getEnergy();
|
|
- // First time clicked on the Element
|
|
|
|
|
|
+ // First time clicked on the Element
|
|
if (pointList.isEmpty()) {
|
|
if (pointList.isEmpty()) {
|
|
pointList.addFirst(new Point(0, 0));
|
|
pointList.addFirst(new Point(0, 0));
|
|
pointList.addLast(new Point((int) (this.getWidth() / scaleX), 0));
|
|
pointList.addLast(new Point((int) (this.getWidth() / scaleX), 0));
|