From 9e673f43799e93cc05829dc43476f3cd25d22eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Fri, 31 Aug 2018 23:34:51 +0200 Subject: [PATCH] Space.layout: never set a negative width --- tiling.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tiling.js b/tiling.js index e0412b7..85165f3 100644 --- a/tiling.js +++ b/tiling.js @@ -290,9 +290,8 @@ class Space extends Array { } } this._inLayout = false; - this.cloneContainer.width = x - gap; - let width = x - gap; + let width = Math.max(0, x - gap); this.cloneContainer.width = width; if (width < this.width) { this.targetX = Math.round((this.width - width)/2);