Permalink
Browse files

Merge pull request #3555 from alexandrekreis/master

Fixing misalignment when swapping presentation with video
  • Loading branch information...
2 parents dc0e4cf + dde5f23 commit c017451e789ac8a1a8257050634843f825881898 @ffdixon ffdixon committed on GitHub Jan 11, 2017
Showing with 9 additions and 2 deletions.
  1. +9 −2 record-and-playback/presentation/playback/presentation/0.9.0/playback.js
@@ -519,8 +519,9 @@ function swapVideoPresentation() {
// if the cursor is currently being useful, he we'll be redrawn automatically soon
showCursor(false);
- // wait for the svg with the slides to be fully loaded and then set the current image
- // as visible.
+ // wait for the svg with the slides to be fully loaded
+ // then set the current image as visible
+ // we also need to retrieve what was the current viewbox size to set it again
function checkSVGLoaded() {
var done = false;
var svg = document.getElementsByTagName("object")[0];
@@ -529,6 +530,12 @@ function swapVideoPresentation() {
if (img !== undefined && img !== null) {
img.style.visibility = "visible";
resizeSlides();
+
+ var vboxVal = getViewboxAtTime(t);
+ if(vboxVal !== undefined) {
+ setViewBox(vboxVal);
+ }
+
done = true;
}
}

0 comments on commit c017451

Please sign in to comment.