Space.layout: never set a negative width

This commit is contained in:
Tor Hedin Brønner
2018-08-31 23:36:09 +02:00
parent 96b9ac57fd
commit 9e673f4379
+1 -2
View File
@@ -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);