handle multiple selection with shift

This commit is contained in:
2025-02-19 13:44:23 +01:00
parent 5f0bcda8ba
commit 02dd84c1f4
6 changed files with 70 additions and 38 deletions

View File

@@ -12,7 +12,6 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Spliterator;
import java.util.stream.Collectors;
public class SCollection extends AbstractShape implements Streamable<Shape> {
private final static Logger logger = LoggerFactory.getLogger(SCollection.class);
@@ -53,9 +52,8 @@ public class SCollection extends AbstractShape implements Streamable<Shape> {
}
@Override
public void setLoc(Point newLoc) {
final Point loc = getBounds().getLocation();
children.forEach(s -> s.translate(newLoc.x - loc.x, newLoc.y - loc.y));
public void translate(int dx, int dy) {
children.forEach(s -> s.translate(dx, dy));
}
@Override