Skip to content

Commit

Permalink
Goes to the currently selected slide after clicking "present" GH-45
Browse files Browse the repository at this point in the history
  • Loading branch information
tantaman committed Sep 24, 2012
1 parent c5b6e46 commit 27eb6c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ui/editor/Editor.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,16 @@ FileStorage, BackgroundPicker, AutoSaver, Archiver, empty) ->
window.previewWind = window.open("index.html?preview=true");
sourceWind = window;

cb = () ->
cb = () =>
if (not sourceWind.previewWind.startImpress?)
setTimeout(cb, 200)
else
sourceWind.previewWind.document.getElementsByTagName("html")[0].innerHTML = showStr;
if not sourceWind.previewWind.impressStarted
sourceWind.previewWind.startImpress(sourceWind.previewWind.document, sourceWind.previewWind);
sourceWind.previewWind.impress().init();
sourceWind.previewWind.imp = sourceWind.previewWind.impress()
sourceWind.previewWind.imp.init()
sourceWind.previewWind.imp.goto(@model.get("activeSlide").get("num"))

$(window.previewWind.document).ready(cb)
#window.location = "index.html?preview=" + showStr;
Expand Down

0 comments on commit 27eb6c3

Please sign in to comment.