Skip to content

Commit

Permalink
fix: center position origin
Browse files Browse the repository at this point in the history
  • Loading branch information
kylehue committed Mar 28, 2024
1 parent 7811007 commit 5dd5e00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/designer/Designer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,16 @@ export class Designer {

switch (material.getPositionOrigin()) {
case "top":
y += height / 2 - tileSize / 2;
y += height / 2;
break;
case "bottom":
y -= height / 2 - tileSize / 2;
y -= height / 2;
break;
case "right":
x -= width / 2 - tileSize / 2;
x -= width / 2;
break;
case "left":
x += width / 2 - tileSize / 2;
x += width / 2;
break;
}

Expand Down

0 comments on commit 5dd5e00

Please sign in to comment.