Skip to content

Commit

Permalink
Adapt box UV origin when resizing on X axis
Browse files Browse the repository at this point in the history
Closes #1819
  • Loading branch information
JannisX11 committed Apr 5, 2024
1 parent 94ab277 commit 680a158
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/outliner/cube.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,10 @@ class Cube extends OutlinerElement {
if (!Format.box_uv_float_size) difference = Math.ceil(difference);
this.uv_offset[0] = (this.oldUVOffset ? this.oldUVOffset[0] : this.uv_offset[0]) + difference;
this.uv_offset[1] = (this.oldUVOffset ? this.oldUVOffset[1] : this.uv_offset[1]) + difference;
} else if (axis == 0 && (!negative || bidirectional)) {
let difference = before - this.size(axis);
if (!Format.box_uv_float_size) difference = Math.ceil(difference);
this.uv_offset[0] = (this.oldUVOffset ? this.oldUVOffset[0] : this.uv_offset[0]) + difference;
}
Canvas.updateUV(this);
}
Expand Down

0 comments on commit 680a158

Please sign in to comment.