Skip to content

Commit fd118d7

Browse files
authored
Merge pull request #348 from vbakke/fix/348-modal-sideeffect
Remove sideeffect when opening modal dialog
2 parents 6a2f02d + e4a1abc commit fd118d7

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
@@ -717,21 +717,21 @@ export class CircularHeatmapComponent implements OnInit {
717717
}
718718
}
719719

720-
navigate(dim: string, subdim: string, activityName: string) {
720+
openActivityDetails(dim: string, subdim: string, activityName: string) {
721721
let navigationExtras = {
722722
dimension: dim,
723723
subDimension: subdim,
724724
activityName: activityName,
725725
};
726-
this.yaml.setURI('./assets/YAML/generated/generated.yaml');
727-
this.activityDetails = this.YamlObject[dim][subdim][activityName];
728-
console.log(this.YamlObject);
729-
console.log(this.YamlObject[dim][subdim]);
726+
this.activityDetails = Object.assign(
727+
{},
728+
this.YamlObject[dim][subdim][activityName]
729+
);
730+
730731
if (this.activityDetails) {
731732
this.activityDetails.navigationExtras = navigationExtras;
732733
}
733734
console.log(this.activityDetails);
734-
console.log(this.ALL_CARD_DATA);
735735
this.showOverlay = true;
736736
}
737737

0 commit comments

Comments
 (0)