]> _ Git - fluidbook-html5.git/commitdiff
wip #4710 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 Sep 2021 13:39:08 +0000 (15:39 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 27 Sep 2021 13:39:08 +0000 (15:39 +0200)
js/libs/fluidbook/fluidbook.loader.js
js/libs/fluidbook/fluidbook.support.js

index 5729477ee00e7a6e069603eb594569588d5468e5..03ed841649fc4d6804de5861cf8aa1a795e80945 100644 (file)
@@ -676,7 +676,7 @@ FluidbookLoader.prototype = {
 
     addTextContents: function (pageNr, callback) {
         var t = $("#page_" + pageNr + ' .texts');
-        if (this.fluidbook.support.chromeBased) {
+        if (this.fluidbook.support.svgtocanvas) {
             $(t).html('<canvas data-page="' + pageNr + '" class="p"></canvas><canvas data-page="' + pageNr + '" class="z"></canvas>');
             this.renderTextsCanvas();
         } else {
@@ -686,7 +686,7 @@ FluidbookLoader.prototype = {
     },
 
     renderTextsCanvas: function () {
-        if (!this.fluidbook.support.chromeBased) {
+        if (!this.fluidbook.support.svgtocanvas) {
             return;
         }
         var $this = this;
index 1ae95490de1d175d2cb96b8390d73d8513664ba7..9fbf5292502796a204cc85dce0b54eb8766cb72a 100644 (file)
@@ -14,6 +14,8 @@ function FluidbookSupport(fluidbook) {
     this.iOS = Modernizr.ios;
     this.edge = Modernizr.edge;
     this.chromeBased = Modernizr.chrome || this.edge;
+    this.svgtocanvas = this.IE === 0;
+
     // 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;