]> _ Git - fluidbook-html5.git/commitdiff
done #1452 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 8 Jun 2017 14:08:03 +0000 (16:08 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 8 Jun 2017 14:08:03 +0000 (16:08 +0200)
js/libs/fluidbook/fluidbook.menu.js

index 2a914b835344c4c0735476d5d0e6df04c0a050c4..e63e56a32f957dc05a4f9b438ac5246b7c2f19d5 100644 (file)
@@ -84,7 +84,7 @@ FluidbookMenu.prototype = {
         }
     },
     openingView: function (callback) {
-        $("#viewOverlay").show();
+        this.showOverlay();
         var $this = this;
         this.fluidbook.resize.resizeView();
         this.fluidbook.tooltip.hideTooltip();
@@ -389,7 +389,7 @@ FluidbookMenu.prototype = {
     }
     ,
     closeView: function (callback, all, animate) {
-        $("#viewOverlay").hide();
+        this.hideOverlay();
         var $this = this;
         if (all == undefined) {
             all = false;
@@ -586,4 +586,18 @@ FluidbookMenu.prototype = {
             });
         });
     },
+
+    hideOverlay: function () {
+        $("#viewOverlay").css('opacity', 0);
+        setTimeout(function () {
+            $("#viewOverlay").hide();
+        }, 400);
+    },
+
+    showOverlay: function () {
+        $("#viewOverlay").css('opacity', 0).show();
+        setTimeout(function () {
+            $("#viewOverlay").css('opacity', 1);
+        }, 10);
+    }
 };
\ No newline at end of file