Index: Source/devtools/front_end/ui/SidebarPane.js |
diff --git a/Source/devtools/front_end/ui/SidebarPane.js b/Source/devtools/front_end/ui/SidebarPane.js |
index cf6d871e17d8a0447e1aaf2b745dd906fd64ab44..bd6389adee7c6592ba83af5725ac426ed4158ff5 100644 |
--- a/Source/devtools/front_end/ui/SidebarPane.js |
+++ b/Source/devtools/front_end/ui/SidebarPane.js |
@@ -159,6 +159,8 @@ WebInspector.SidebarPaneStack = function() |
WebInspector.View.call(this); |
this.setMinimumSize(25, 0); |
this.element.className = "sidebar-pane-stack"; // Override |
+ /** @type {!Map.<!WebInspector.SidebarPane, !WebInspector.SidebarPaneTitle>} */ |
+ this._titleByPane = new Map(); |
} |
WebInspector.SidebarPaneStack.prototype = { |
@@ -167,7 +169,21 @@ WebInspector.SidebarPaneStack.prototype = { |
*/ |
addPane: function(pane) |
{ |
- new WebInspector.SidebarPaneTitle(this.element, pane); |
+ this._titleByPane.put(pane, new WebInspector.SidebarPaneTitle(this.element, pane)); |
+ }, |
+ |
+ /** |
+ * @param {!WebInspector.SidebarPane} pane |
+ * @param {boolean} hide |
+ */ |
+ toggleHidden: function(pane, hide) |
+ { |
+ var title = this._titleByPane.get(pane); |
+ if (!title) |
+ return; |
+ |
+ title.element.classList.toggle("hidden", hide); |
+ pane.element.classList.toggle("hidden", hide); |
}, |
__proto__: WebInspector.View.prototype |