Skip to content

Commit

Permalink
Use monitor centered group limits if available
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesg99 committed Jul 21, 2020
1 parent cc75702 commit a7d411f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,10 @@ var dtpPanel = Utils.defineClass({

let prevGroup = this._elementGroups[i - 1];
let nextGroup = this._elementGroups[i + 1];
let prevLimit = prevGroup && prevGroup.fixed ? prevGroup[this.varCoord.c2] : panelAlloc[this.varCoord.c1];
let nextLimit = nextGroup && nextGroup.fixed ? nextGroup[this.varCoord.c1] : panelAlloc[this.varCoord.c2];
let prevLimit = prevGroup && prevGroup.fixed ? prevGroup[this.varCoord.c2] :
centeredMonitorGroup && group.index > centeredMonitorGroup.index ? centeredMonitorGroup[this.varCoord.c2] : panelAlloc[this.varCoord.c1];
let nextLimit = nextGroup && nextGroup.fixed ? nextGroup[this.varCoord.c1] :
centeredMonitorGroup && group.index < centeredMonitorGroup.index ? centeredMonitorGroup[this.varCoord.c1] : panelAlloc[this.varCoord.c2];

if (group.position == Pos.STACKED_TL) {
allocateGroup(group, panelAlloc[this.varCoord.c1], nextLimit);
Expand Down

0 comments on commit a7d411f

Please sign in to comment.