Skip to content

Commit 6d9fb37

Browse files
committed
bar: panel zIndex is stored in session
1 parent d39cb07 commit 6d9fb37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Tracy/assets/Bar/bar.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
if (this.is(Panel.WINDOW)) {
187187
localStorage.setItem(this.id, JSON.stringify({window: true}));
188188
} else if (pos.width) {
189-
localStorage.setItem(this.id, JSON.stringify({right: pos.right, bottom: pos.bottom}));
189+
localStorage.setItem(this.id, JSON.stringify({right: pos.right, bottom: pos.bottom, zIndex: this.elem.style.zIndex - Tracy.panelZIndex}));
190190
} else {
191191
localStorage.removeItem(this.id);
192192
}
@@ -203,6 +203,8 @@
203203
this.init();
204204
this.toFloat();
205205
setPosition(this.elem, pos);
206+
this.elem.style.zIndex = Tracy.panelZIndex + (pos.zIndex || 1);
207+
Panel.zIndexCounter = Math.max(Panel.zIndexCounter, (pos.zIndex || 1)) + 1;
206208
}
207209
};
208210

0 commit comments

Comments
 (0)