Skip to content

Commit

Permalink
Merge pull request #311 from PrefectHQ/viewport-clamp
Browse files Browse the repository at this point in the history
Add a minWidth to the viewport
  • Loading branch information
pleek91 authored Nov 3, 2023
2 parents 9b2e5a1 + ab9144e commit 4c6d392
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 4c6d392

Please sign in to comment.