Skip to content

Commit

Permalink
TilePicker: fix picker size > image size
Browse files Browse the repository at this point in the history
LeoVgr committed Jan 30, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f004084 commit 0cb24a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hide/comp/TileSelector.hx
Original file line number Diff line number Diff line change
@@ -238,6 +238,10 @@ class TileSelector extends Component {
if( imageElt != i ) return;
imageWidth = i.width;
imageHeight = i.height;
@:bypassAccessor this.size = {
height:Std.int(hxd.Math.clamp(this.size.height, 1, imageHeight)),
width:Std.int(hxd.Math.clamp(this.size.height, 1, imageWidth))
};

zoomLevel = getDisplayState("zoomLevel") ?? getDefaultZoomLevel();

0 comments on commit 0cb24a5

Please sign in to comment.