Making better ep highlights (#20055)

This commit is contained in:
Aasim Khan
2022-07-15 15:31:01 -07:00
committed by GitHub
parent 023ee57e98
commit 67637a41f5
8 changed files with 13 additions and 16 deletions

View File

@@ -49,7 +49,6 @@ export class AzdataGraphView {
this._diagram = new azdataGraph.azdataQueryPlan(queryPlanConfiguration);
this.setGraphProperties();
this.selectElement(this._executionPlan.root);
this._cellInFocus = this._diagram.graph.getSelectionCell();
this.initializeGraphEvents();
}
@@ -72,7 +71,7 @@ export class AzdataGraphView {
this.onElementSelected = this._onElementSelectedEmitter.event;
this._diagram.graph.getSelectionModel().addListener('change', (sender, evt) => {
if (evt.properties?.removed) {
if (this._cellInFocus.id === evt.properties.removed[0].id) {
if (this._cellInFocus?.id === evt.properties.removed[0].id) {
return;
}
const newSelection = evt.properties.removed[0];

View File

@@ -193,7 +193,6 @@ export class ExecutionPlanComparisonEditorView {
c.style.display = 'none';
});
this._topPlanDiagramContainers[e.index].style.display = '';
this.topPlanDiagrams[e.index].selectElement(undefined);
this._propertiesView.setTopElement(this._topPlanDiagramModels[e.index].root);
this._topPlanRecommendations.recommendations = this._topPlanDiagramModels[e.index].recommendations;
this._activeTopPlanIndex = e.index;
@@ -221,7 +220,6 @@ export class ExecutionPlanComparisonEditorView {
c.style.display = 'none';
});
this._bottomPlanDiagramContainers[e.index].style.display = '';
this.bottomPlanDiagrams[e.index].selectElement(undefined);
this._propertiesView.setTopElement(this._bottomPlanDiagramModels[e.index].root);
this._bottomPlanRecommendations.recommendations = this._bottomPlanDiagramModels[e.index].recommendations;
this._activeBottomPlanIndex = e.index;