Browse Source

increases Replacement Area to Half of a HolonObject

Andreas T. Meyer-Berg 6 năm trước cách đây
mục cha
commit
8e9ad476f1

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

@@ -57,7 +57,7 @@ public class CanvasController {
 		int y = object.getPosition().y;
 		
 		/** distance treshold for replacement */
-		int treshhold = model.getScale()/4;
+		int treshhold = model.getScale()/2;
 		
 		/** number of Objects that might be replaced (should be 1) */
 		int replaceCounter = 0;

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

@@ -456,7 +456,7 @@ class NodeController {
 		int y = object.getPosition().y;
 		
 		/** distance threshold for replacement */
-		int treshhold = model.getScale()/4;
+		int treshhold = model.getScale()/2;
 		
 		/** number of Objects that might be replaced (should be 1) */
 		int replaceCounter = 0;

+ 1 - 1
src/ui/view/AbstractCanvas.java

@@ -527,7 +527,7 @@ public abstract class AbstractCanvas extends JPanel {
 	protected boolean checkForReplacement(ArrayList<AbstractCpsObject> objects, AbstractCpsObject draggedCps, int x, int y){
 		
 		/** distance treshold for replacement */
-		int treshhold = controller.getScale()/4*2;
+		int treshhold = controller.getScale()/2;
 						
 		/** number of Objects that might be replaced (should be 1) */
 		int replaceCounter = 0;