Browse Source

little HolonCanvas change

jess 7 years ago
parent
commit
bc3474b33f
2 changed files with 3 additions and 3 deletions
  1. 1 1
      src/ui/controller/HolonCanvasController.java
  2. 2 2
      src/ui/view/HolonCanvas.java

+ 1 - 1
src/ui/controller/HolonCanvasController.java

@@ -77,7 +77,7 @@ public class HolonCanvasController {
 		// adding new HolonBodys
 		for (int i = bodies.size(); i < subCount; i++) {
 			float radius = (subnets.get(i).getObjects().size() * 5 + 10) * HolonBodyScale / 100;
-			HolonBody temp = new HolonBody((float) (center.width + Math.pow(-1, i)), center.height + 1, radius,
+			HolonBody temp = new HolonBody((float) (center.width + Math.pow(-1, i)), (float)(center.height + Math.pow(-1, i)), radius,
 					(float) Math.pow((subnets.get(i).getObjects().size() + 1) * 5, 3), model.getSubNetColors().get(i));
 			temp.setId(i);
 			bodies.add(temp);

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

@@ -141,7 +141,7 @@ public class HolonCanvas extends JPanel implements MouseWheelListener, MouseList
 			totalElapsedTime = 0;
 		}
 
-		// check if HolonBodys should bes sorted after size
+		// check if HolonBodys should be sorted after size
 		if (chckbxSort.isSelected() && sizeChange) {
 			hCController.rearrangeAfterSize();
 			sizeChange = false;
@@ -171,7 +171,7 @@ public class HolonCanvas extends JPanel implements MouseWheelListener, MouseList
 		this.g2.fillRect(0, 0, getWidth(), getHeight());
 
 		bodies = hCController.getBodies();
-		// Render Game Objects
+		// Render Objects
 		for (int i = 0; i < subCount; i++) {
 			bodyNr = bodies.get(i).getId();
 			switch (comboChoice) {