From: Vincent Vanwaelscappel Date: Fri, 24 Dec 2021 11:36:45 +0000 (+0100) Subject: wait #4992 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=81a64ca9648e3e1486a976d1f841bb6007ea1228;p=fluidbook-html5.git wait #4992 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.support.js b/js/libs/fluidbook/fluidbook.support.js index 640bb3df..82b69950 100644 --- a/js/libs/fluidbook/fluidbook.support.js +++ b/js/libs/fluidbook/fluidbook.support.js @@ -14,8 +14,8 @@ function FluidbookSupport(fluidbook) { this.iOS = Modernizr.ios; this.edge = Modernizr.edge; this.chromeBased = Modernizr.chrome || this.edge; - this.svgtocanvas = this.IE === 0 && !(this.safari && this.macOs); - this.svgtocanvg = false && this.svgtocanvas; + this.svgtocanvas = this.fluidbook.settings.svgToCanvas && this.IE === 0 && !(this.safari && this.macOs); + this.svgtocanvg = false;// && this.svgtocanvas; // If in node-webkit or if the index.html fluidbook is locally open in a browser this.offline = (typeof process !== "undefined" && process.versions['node-webkit']) || window.location.toString().indexOf("file://") == 0; @@ -86,8 +86,7 @@ FluidbookSupport.prototype = { } catch (err) { $this.datauriallowed = false; } - }, - getTransitionEndEvent: function (all) { + }, getTransitionEndEvent: function (all) { if (all == undefined) { all = false; } @@ -95,15 +94,13 @@ FluidbookSupport.prototype = { return this.transitionEndEvent; } return "webkitTransitionEnd transitionend oTransitionEnd msTransitionEnd transitionEnd"; - }, - hasNetwork: function () { + }, hasNetwork: function () { if (navigator.onLine != undefined) { return navigator.onLine; } else { return networkState() != 'none'; } - }, - networkState: function () { + }, networkState: function () { var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection || { type: 'unknown' }; @@ -127,8 +124,7 @@ FluidbookSupport.prototype = { t = 'none'; } return t; - }, - initEvents: function () { + }, initEvents: function () { var $this = this; if (!isMobile(false)) { @@ -167,15 +163,13 @@ FluidbookSupport.prototype = { return transitions[t]; } } - }, - checkOrientation: function () { + }, checkOrientation: function () { var o = this.getOrientation(); if (o != this._orientation) { this._orientation = o; resize(); } - }, - getOrientation: function () { + }, getOrientation: function () { try { if ((this.fluidbook.pad && this.fluidbook.pad.enabled) || this.fluidbook.mobilefirst.enabled) { return 0;