From ab9144efcae9300e976de30205ef3548d355dde4 Mon Sep 17 00:00:00 2001 From: Craig Harshbarger Date: Fri, 3 Nov 2023 08:47:43 -0500 Subject: [PATCH] Add a minWidth to the viewport --- src/objects/viewport.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/objects/viewport.ts b/src/objects/viewport.ts index cb92e3cf..29721aed 100644 --- a/src/objects/viewport.ts +++ b/src/objects/viewport.ts @@ -37,6 +37,9 @@ export async function startViewport(): Promise { .decelerate({ friction: 0.9, }) + .clampZoom({ + minWidth: stage.clientWidth / 2, + }) application.stage.addChild(viewport)