Skip to content

Commit

Permalink
Add a minWidth to the viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
pleek91 committed Nov 3, 2023
1 parent fcb31a6 commit ab9144e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/objects/viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ export async function startViewport(): Promise<void> {
.decelerate({
friction: 0.9,
})
.clampZoom({
minWidth: stage.clientWidth / 2,
})

application.stage.addChild(viewport)

Expand Down

0 comments on commit ab9144e

Please sign in to comment.