gl-w-frontend
Advanced tools
Comparing version 1.1.15-alpha to 1.1.16-alpha
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var screenfull_1 = require("screenfull"); | ||
var screenfull = require("screenfull"); | ||
/** | ||
@@ -8,12 +8,8 @@ * Ffullscreen | ||
exports.fullscreenListener = function (menuButton, alt, src, showLog) { | ||
console.log(screenfull_1); | ||
console.log(screenfull_1.isEnabled); | ||
console.log(screenfull_1.default.isEnabled); | ||
if (showLog === void 0) { showLog = false; } | ||
if (screenfull_1.default.isEnabled) { | ||
if (screenfull.isEnabled) { | ||
// @ts-ignore | ||
screenfull_1.default.on('change', function () { | ||
screenfull.on('change', function () { | ||
// @ts-ignore | ||
if (screenfull_1.default.isFullscreen) { | ||
if (screenfull.isFullscreen) { | ||
menuButton.src = src.exit; | ||
@@ -28,3 +24,3 @@ menuButton.alt = alt.exit; | ||
// @ts-ignore | ||
var label = screenfull_1.default.isFullscreen ? 'enabled' : 'disabled'; | ||
var label = screenfull.isFullscreen ? 'enabled' : 'disabled'; | ||
console.log("Fullscreen " + label); | ||
@@ -40,3 +36,3 @@ } | ||
// @ts-ignore | ||
screenfull_1.default.off('change', function () { | ||
screenfull.off('change', function () { | ||
console.log('Fullscreen listener has been disabled'); | ||
@@ -48,5 +44,5 @@ }); | ||
return new Promise(function (resolve) { | ||
if (screenfull_1.default.isEnabled) { | ||
if (!screenfull_1.default.isFullscreen) { | ||
screenfull_1.default.request().then(function () { | ||
if (screenfull.isEnabled) { | ||
if (!screenfull.isFullscreen) { | ||
screenfull.request().then(function () { | ||
menuButton.src = src.exit; | ||
@@ -59,3 +55,3 @@ menuButton.alt = alt.exit; | ||
else { | ||
screenfull_1.default.exit().then(function () { | ||
screenfull.exit().then(function () { | ||
menuButton.src = src.enter; | ||
@@ -69,3 +65,3 @@ menuButton.alt = alt.enter; | ||
// @ts-ignore | ||
var label = screenfull_1.default.isFullscreen ? 'enabled' : 'disabled'; | ||
var label = screenfull.isFullscreen ? 'enabled' : 'disabled'; | ||
console.log("Fullscreen " + label); | ||
@@ -91,2 +87,2 @@ } | ||
}; | ||
//# sourceMappingURL=core-services-browser.service.js.map | ||
//# sourceMappingURL=core-services-browser.service.js.map |
{ | ||
"name": "gl-w-frontend", | ||
"version": "1.1.15-alpha", | ||
"version": "1.1.16-alpha", | ||
"description": "Common code for using among web frameworks using pure JavaScript, ES6+ and TypeScript", | ||
@@ -5,0 +5,0 @@ "main": "lib/", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23095
394