Merge pull request #2300 from mw75/master

Resize Event
This commit is contained in:
Hakim El Hattab 2019-01-31 20:09:45 +01:00 committed by GitHub
commit 9c1615fff1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -2104,6 +2104,7 @@
dom.slides.style.height = size.height + 'px';
// Determine scale of content to fit within available space
var oldscale =scale;
scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height );
// Respect max/min scale settings
@ -2169,6 +2170,13 @@
}
if( oldscale!==scale ){
dispatchEvent( 'resize', {
'oldscale': oldscale,
'scale': scale,
'size': size
} );
}
}
updateProgress();