mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-06 03:56:53 +00:00
space.layout: compare against correct width when centering
This commit is contained in:
@@ -263,8 +263,10 @@ class Space extends Array {
|
||||
}
|
||||
this._inLayout = false;
|
||||
|
||||
if (x < this.width) {
|
||||
this.targetX = Math.round((this.width - (x - gap))/2);
|
||||
let width = x - gap;
|
||||
this.cloneContainer.width = width;
|
||||
if (width < this.width) {
|
||||
this.targetX = Math.round((this.width - width)/2);
|
||||
}
|
||||
if (animate) {
|
||||
Tweener.addTween(this.cloneContainer,
|
||||
|
||||
Reference in New Issue
Block a user