Make the presentation have the correct aspect ratio even when the window has a smalle...
[hacks/simpleWebSlides.git] / simpleWebSlides.js
index 80eecb0..a0e0ef8 100644 (file)
@@ -163,7 +163,7 @@ SWS.Config = new SWS.ConfigBuilder ();
 
 SWS.Effects = new function () {
     var self = this;
-
+    
     self.objectDeactivateFadeOut = function (o) {
        if (o.is("embed")) return;
         o.animate({'opacity': '0'}, 200,
@@ -395,7 +395,7 @@ SWS.Presentation = new function () {
             };
             all.find("*").addBack().promise().done(function() {
                 //wait for all elements to finish transitionning, in case a callback animate something
-                //an denable _input_events again.
+                //anenable _input_events again.
                 _disable_input_events = false;
             });
         });
@@ -487,6 +487,11 @@ SWS.Presentation = new function () {
 
     self.printMode = function () {
         _print_mode = true;
+
+       var old_fx_status = $.fx.off;
+       //disable animation while printing.
+
+       $.fx.off = true;
         var progress = $("<div style='position:fixed;top:0pt;left:0pt;background:white;color:black;width:100%;height:100vh;z-index:200;' id='sws-print-progress'>Rendering presentation: <span id='sws-percent-progress'></span>%</div>");
         $("body").append(progress);
 
@@ -513,7 +518,8 @@ SWS.Presentation = new function () {
                 $("#sws-percent-progress").text(100);
                 progress.remove();
                window.status = 'Ready';
-               window.print();
+               $.fx.off = old_fx_status;
+               if (SWS.Utils.getParameterByName("dialog") != "off") window.print();
             }
         };
         loop();