Skip to content

Commit d39cb07

Browse files
committed
bar: added Tracy.panelZIndex
1 parent 70871cc commit d39cb07

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Tracy/assets/Bar/bar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
return contentId;
1515
};
1616

17+
Tracy.panelZIndex = Tracy.panelZIndex || 20000;
18+
1719
var Panel = Tracy.DebugPanel = function(id) {
1820
this.id = id;
1921
this.elem = document.getElementById(this.id);
@@ -24,7 +26,7 @@
2426
Panel.FLOAT = 'tracy-mode-float';
2527
Panel.WINDOW = 'tracy-mode-window';
2628
Panel.FOCUSED = 'tracy-focused';
27-
Panel.zIndex = 20001;
29+
Panel.zIndexCounter = 1;
2830

2931
Panel.prototype.init = function() {
3032
var _this = this, elem = this.elem;
@@ -98,7 +100,7 @@
98100
clearTimeout(elem.Tracy.displayTimeout);
99101
elem.Tracy.displayTimeout = setTimeout(function() {
100102
elem.classList.add(Panel.FOCUSED);
101-
elem.style.zIndex = Panel.zIndex++;
103+
elem.style.zIndex = Tracy.panelZIndex + Panel.zIndexCounter++;
102104
if (callback) {
103105
callback();
104106
}

0 commit comments

Comments
 (0)