Parcourir la source

fertiger fix un fertig drag and drop von allen

Kevin Trometer il y a 8 ans
Parent
commit
7ad3ad67c0
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/ui/view/MyCanvas.java

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

@@ -386,11 +386,11 @@ public class MyCanvas extends JPanel implements MouseListener, MouseMotionListen
 						y = (int) (cps.getPosition().y + yDist);
 
 						// Make sure its in bounds
-						if (x < 0 - controller.getScaleDiv2())
+						if (x <= 0)
 							x = 0;
 						else if (x > this.getWidth() - controller.getScale())
 							x = this.getWidth() - controller.getScale();
-						if (y < controller.getScaleDiv2())
+						if (y <=0)
 							y = 0;
 						else if (y > this.getHeight() - controller.getScale())
 							y = this.getHeight() - controller.getScale();