Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
feat(feature-discovery): propagate click event
Browse files Browse the repository at this point in the history
  • Loading branch information
garygrossgarten committed Dec 1, 2019
1 parent 49c0e3e commit 2707ab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div #pOuter class="feature center pulse" [style.height]="(innerDiameter + featurePadding) + 'px'"
[style.width]="(innerDiameter + featurePadding) + 'px'">
</div>
<div #pInner class="feature center inner ion-activatable" (click)="fivClick.emit()"
<div #pInner class="feature center inner ion-activatable" (click)="fivClick.emit($event)"
[style.height]="(innerDiameter + (icon ? featurePadding : 0)) + 'px'"
[style.width]="(innerDiameter + (icon ? featurePadding : 0)) + 'px'">
<fiv-icon class="center" *ngIf="icon" [name]="icon"></fiv-icon>
Expand Down
8 changes: 4 additions & 4 deletions projects/core/src/lib/feature-discovery/feature.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export class FivFeature {
.subscribe(() => {
this.didOpen();
});
featureOverlay.fivClick.pipe(first()).subscribe(() => {
this.featureClick();
featureOverlay.fivClick.pipe(first()).subscribe(ev => {
this.featureClick(ev);
});
featureOverlay.fivBackdropClick.pipe(first()).subscribe(() => {
this.hide();
Expand All @@ -113,9 +113,9 @@ export class FivFeature {
this.isOpen = true;
}

private featureClick() {
private featureClick(ev) {
if (this.overlayRef) {
this.fivFeatureClick.emit();
this.fivFeatureClick.emit(ev);
this.fivWillClose.emit();
this.overlayRef.instance.featureClick();
this.overlayRef.instance.fivClose.pipe(first()).subscribe(() => {
Expand Down

0 comments on commit 2707ab6

Please sign in to comment.