Skip to content

Commit e4a1abc

Browse files
committed
Remove sideeffect when opening modal dialog
1 parent 568a4ba commit e4a1abc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/app/component/circular-heatmap/circular-heatmap.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ <h2>Nothing to show</h2>
251251
class="title-button"
252252
(click)="
253253
$event.preventDefault();
254-
navigate(
254+
openActivityDetails(
255255
currentDimension,
256256
cardHeader,
257257
activity['activityName']

src/app/component/circular-heatmap/circular-heatmap.component.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -739,21 +739,21 @@ export class CircularHeatmapComponent implements OnInit {
739739
}
740740
}
741741

742-
navigate(dim: string, subdim: string, activityName: string) {
742+
openActivityDetails(dim: string, subdim: string, activityName: string) {
743743
let navigationExtras = {
744744
dimension: dim,
745745
subDimension: subdim,
746746
activityName: activityName,
747747
};
748-
this.yaml.setURI('./assets/YAML/generated/generated.yaml');
749-
this.activityDetails = this.YamlObject[dim][subdim][activityName];
750-
console.log(this.YamlObject);
751-
console.log(this.YamlObject[dim][subdim]);
748+
this.activityDetails = Object.assign(
749+
{},
750+
this.YamlObject[dim][subdim][activityName]
751+
);
752+
752753
if (this.activityDetails) {
753754
this.activityDetails.navigationExtras = navigationExtras;
754755
}
755756
console.log(this.activityDetails);
756-
console.log(this.ALL_CARD_DATA);
757757
this.showOverlay = true;
758758
}
759759

0 commit comments

Comments
 (0)