mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
aecb1e33d4
Adds #103
17 lines
401 B
TypeScript
17 lines
401 B
TypeScript
import { Directive, HostListener } from "@angular/core";
|
|
import * as screenfull from 'screenfull';
|
|
|
|
@Directive({
|
|
selector: '[toggleFullscreen]',
|
|
})
|
|
export class ToggleFullscreenDirective {
|
|
|
|
@HostListener('click') onClick() {
|
|
// HACK: This should be behind a service in the event the library changes
|
|
if (screenfull.enabled) {
|
|
screenfull.toggle();
|
|
}
|
|
}
|
|
|
|
}
|