]> _ Git - fluidbook-html5.git/commitdiff
wait #4992 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Dec 2021 11:36:45 +0000 (12:36 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Dec 2021 11:36:45 +0000 (12:36 +0100)
js/libs/fluidbook/fluidbook.support.js

index 640bb3df885a025b4abc62a2c09d02063fbe86e3..82b699503851118090abf6ba3ee42e85521e82d1 100644 (file)
@@ -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;