Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: tracing/tracing/ui/side_panel/side_panel_container.html

Issue 1978673002: Make side panels auto-sized and resizeable. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: fix glitch? Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tracing/tracing/ui/side_panel/metrics_side_panel.html ('k') | tracing/tracing/ui/value_set_view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/side_panel/side_panel_container.html
diff --git a/tracing/tracing/ui/side_panel/side_panel_container.html b/tracing/tracing/ui/side_panel/side_panel_container.html
index 7cf3905f77e0f19649a77aceb21a7b32814ce4e4..e152917d464e2a1a677e92c7443d2bc34dc1b0c8 100644
--- a/tracing/tracing/ui/side_panel/side_panel_container.html
+++ b/tracing/tracing/ui/side_panel/side_panel_container.html
@@ -6,8 +6,8 @@ found in the LICENSE file.
-->
<link rel="import" href="/tracing/base/range.html">
-<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
<link rel='import' href='/tracing/ui/base/polymer_utils.html'>
+<link rel="import" href="/tracing/ui/side_panel/side_panel.html">
<polymer-element name='tr-ui-side-panel-container' is='HTMLUnknownElement'>
<template>
@@ -66,6 +66,7 @@ found in the LICENSE file.
</style>
<active-panel-container id='active_panel_container'>
+ <tr-ui-b-drag-handle id="side_panel_drag_handle"></tr-ui-b-drag-handle>
</active-panel-container>
<tab-strip id='tab_strip'></tab-strip>
</template>
@@ -77,6 +78,8 @@ found in the LICENSE file.
this.activePanelContainer_ = this.$.active_panel_container;
this.tabStrip_ = this.$.tab_strip;
+ this.dragHandle_ = this.$.side_panel_drag_handle;
+ this.dragHandle_.horizontal = false;
this.rangeOfInterest_ = new tr.b.Range();
this.brushingStateController_ = undefined;
this.onSelectionChanged_ = this.onSelectionChanged_.bind(this);
@@ -126,9 +129,9 @@ found in the LICENSE file.
},
get activePanel() {
- if (this.activePanelContainer_.children.length === 0)
+ if (this.activePanelContainer_.children.length < 2)
return undefined;
- return this.activePanelContainer_.children[0];
+ return this.activePanelContainer_.children[1];
},
get activePanelType() {
@@ -150,7 +153,9 @@ found in the LICENSE file.
this.getLabelElementForPanelType_(
this.activePanelType).removeAttribute('selected');
}
- this.activePanelContainer_.textContent = '';
+
+ if (this.activePanel)
+ this.activePanelContainer_.removeChild(this.activePanel);
if (panelType === undefined) {
this.removeAttribute('expanded');
@@ -163,6 +168,7 @@ found in the LICENSE file.
this.setAttribute('expanded', true);
this.activePanelContainer_.appendChild(panel);
+ this.dragHandle_.target = panel;
panel.rangeOfInterest = this.rangeOfInterest_;
panel.selection = this.selection_;
panel.model = this.model;
@@ -222,7 +228,8 @@ found in the LICENSE file.
this.activePanelType = previouslyActivePanelType;
this.setAttribute('expanded', true);
} else {
- this.activePanelContainer_.textContent = '';
+ if (this.activePanel)
+ this.activePanelContainer_.removeChild(this.activePanel);
this.removeAttribute('expanded');
}
},
« no previous file with comments | « tracing/tracing/ui/side_panel/metrics_side_panel.html ('k') | tracing/tracing/ui/value_set_view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698