From 1937a3827545e498e40d24d3c8b4582d6d936824 Mon Sep 17 00:00:00 2001 From: Priyanka Date: Fri, 16 Jul 2021 14:06:56 +0000 Subject: [PATCH] If only one trace is run, do not display navigation options for timeline. Test: Run one trace. Check that there is no navigation drop down list to the left of the timeline. Run multiple traces. Check that the navigation drop down list now appears. Bug: 162716882 Change-Id: Ic466dd6b5e9f5e08fad515d31122206b6bd9898f --- tools/winscope/src/Overlay.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tools/winscope/src/Overlay.vue b/tools/winscope/src/Overlay.vue index 4bb051e49..c8cfa8137 100644 --- a/tools/winscope/src/Overlay.vue +++ b/tools/winscope/src/Overlay.vue @@ -81,8 +81,9 @@ @@ -376,7 +377,7 @@ export default { default: const split = this.navigationStyle.split('-'); if (split[0] !== NAVIGATION_STYLE.TARGETED) { - throw new Error('Unexpected nagivation type'); + throw new Error('Unexpected navigation type'); } const fileType = split[1]; @@ -398,7 +399,7 @@ export default { default: const split = this.navigationStyle.split('-'); if (split[0] !== NAVIGATION_STYLE.TARGETED) { - throw new Error('Unexpected nagivation type'); + throw new Error('Unexpected navigation type'); } const fileType = split[1]; @@ -425,12 +426,15 @@ export default { .traces[this.navigationStyle.split('-')[1]]; } - throw new Error('Unexpected Nagivation Style'); + throw new Error('Unexpected Navigation Style'); }, isCropped() { return this.crop != null && (this.crop.left !== 0 || this.crop.right !== 1); }, + multipleTraces() { + return this.timelineFiles.length > 1; + }, }, updated() { this.$nextTick(() => { @@ -589,7 +593,7 @@ export default { default: const split = this.navigationStyle.split('-'); if (split[0] !== NAVIGATION_STYLE.TARGETED) { - throw new Error('Unexpected nagivation type'); + throw new Error('Unexpected navigation type'); } const fileType = split[1]; @@ -816,7 +820,7 @@ export default { margin-top: 4px; } -.nagivation-style-selection-field { +.navigation-style-selection-field { width: 90px; margin-right: 10px; margin-bottom: 0;