We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
imageViewer
1 parent 397a00e commit 151ebf0Copy full SHA for 151ebf0
src/image-viewer.directive.ts
@@ -15,7 +15,9 @@ export class ImageViewerDirective {
15
private _el: ElementRef
16
) { }
17
18
- @HostListener('click') onClick(): void {
+ @HostListener('click', ['$event']) onClick(event: Event): void {
19
+ event.stopPropagation();
20
+
21
let position = this._el.nativeElement.getBoundingClientRect();
22
23
let imageViewer = ImageViewer.create({image: this.src || this._el.nativeElement.src, position: position});
0 commit comments