Presentation mode - delay update of notes

32 views
Skip to first unread message

Martyn Wheeler

unread,
Jul 24, 2013, 8:08:12 AM7/24/13
to jmpr...@googlegroups.com
Hi,

On old/slow hardware the presentation can become a bit laggy when using presentation mode.  I'm guessing that this may be caused by simultaneous updates of the presentation in the main window and notes window at the same time.  I was wondering if it would be possible to delay the update in the notes window until the main window has finished stepping on? Maybe someone else has looked at this already, my javascript skills are not yet fully honed so if someone can give a few pointers?

Thanks

Martyn

Tobias Koppers

unread,
Jul 25, 2013, 12:38:49 PM7/25/13
to jmpress.js
You may just want to disable the animation with:

transitionDuration: 0,
animation: {
transitionDuration: "0s",
transitionDelay: "0s"
}


2013/7/24 Martyn Wheeler <martynd...@gmail.com>

Martyn

--
You received this message because you are subscribed to the Google Groups "jmpress.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmpressjs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Martyn Wheeler

unread,
Jul 26, 2013, 6:14:19 AM7/26/13
to jmpr...@googlegroups.com, tobias....@googlemail.com
Hi Tobias,

Thanks for the reply.  Is it possible to do this just for the presentation-screen.html file?  Below is the relevant part of my file at the moment. or do I have to put it in the main presentation file?

Cheers,
Martyn

    <script type="text/javascript" src="../js/jquery-2.0.3.js"></script>
    <script type="text/javascript" src="../js/jmpress.js"></script>
    <script type="text/javascript">
      var notesUrl = false;
      var PREFIX = "jmpress-presentation-";
      window.addEventListener("message", function(event) {
 if(typeof event.data !== "string" || event.data.indexOf(PREFIX) !== 0) {
     return;
 }
 var json = JSON.parse(event.data.slice(PREFIX.length));
 switch(json.type) {
 case "afterInit":
     event.source.postMessage(PREFIX + JSON.stringify({type:"listen"}), "*");
     break;
 case "select":
     window.opener.postMessage(PREFIX + JSON.stringify(json), "*");
     if(notesUrl && /[a-z0-9\-]+/i.test(json.targetId))
 $("#notesframe").attr("src", notesUrl+"#"+json.targetId);
     break;
 case "url":
     event.source.postMessage(PREFIX + JSON.stringify({type:"ok"}), "*");
     $("#frame").attr("src", json.url);
     notesUrl = json.notesUrl || notesUrl;
     if(notesUrl)
 $("#notesframe").attr("src", notesUrl);
     break;
 }
      });
    </script>
Reply all
Reply to author
Forward
0 new messages