Skip to content

Commit

Permalink
fix: using wrong coordinate system prevents mouse click
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Zavallone committed Oct 14, 2020
1 parent 0f40af0 commit c3114f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ngx-imageviewer/src/lib/imageviewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export class ImageViewerComponent implements AfterViewInit, OnDestroy {

//#region Touch events
onTap(evt) {
const position = { x: evt.pageX, y: evt.pageY };
const position = { x: evt.clientX, y: evt.clientY };
const activeElement = this.getUIElement(this.screenToCanvasCentre(position));
if (activeElement !== null) { activeElement.onClick(evt); }
}
Expand Down

0 comments on commit c3114f1

Please sign in to comment.