Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(@Inject(I18nToken) readonly I18n:op.I18n) {
super(I18n);
this.activateLabel = I18n.t('js.zen_mode.button_activate');
this.deactivateLabel = I18n.t('js.zen_mode.button_deactivate');
let self = this;
if (screenfull.enabled) {
screenfull.onchange(function() {
// This event might get triggered several times for once leaving
// fullscreen mode.
if (!screenfull.isFullscreen) {
self.deactivateZenMode();
}
});
}
}
private activateZenMode():void {
WorkPackageZenModeButtonComponent.inZenMode = true;
angular.element('body').addClass('zen-mode');
if (screenfull.enabled) {
screenfull.request();
}
}