diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java index a403faa..cf927d1 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/StrokesRest.java @@ -15,7 +15,6 @@ @Component @Path("/gallery") public class StrokesRest { - private Position Position = new Position(); private ArrayList positions = new ArrayList<>(); private Stroke Test = new Stroke(); private Gallery gallery = Gallery.getInstance(); @@ -73,6 +72,7 @@ @Produces(MediaType.APPLICATION_JSON) public ArrayList getPositions(@PathParam("aid") Integer aid, @PathParam("strokeNo") Integer strokeNo) { var animation = gallery.getAnimationInformation(aid); + return this.positions; // if(animation != null) { // return this.positions; @@ -92,8 +92,10 @@ @Produces(MediaType.APPLICATION_JSON) public void addPositions(@PathParam("aid") Integer aid, @FormParam("x") Float x, @FormParam("y") Float y) { var animation = gallery.getAnimationInformation(aid); - this.Position.setXY(x, y); - this.positions.add(this.Position); + + Position Position = new Position(); + Position.setXY(x, y); + this.positions.add(Position); // if(animation != null) { // this.Position.setXY(x, y); // this.positions.add(this.Position);