Last active
November 9, 2018 13:07
-
-
Save WouterSpaak/9c4121f1fb9c5c914c8d78c9c7d24fbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ObservableHostListener<MouseEvent, Coordinate>( | |
'window:click', | |
['$event'], | |
pipe( | |
map(({ clientX, clientY }) => { | |
return { x: clientX, y: clientY }; | |
}) | |
) | |
) | |
coordinateStream$: Observable<Coordinate>; | |
interface Coordinate { | |
x: number; | |
y: number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment