emmit resize event if scale changed
This commit is contained in:
parent
0b3e7839eb
commit
abee356e42
2 changed files with 16 additions and 0 deletions
|
@ -1971,6 +1971,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
|
||||
|
@ -2036,6 +2037,13 @@
|
|||
|
||||
}
|
||||
|
||||
if( oldscale!==scale ){
|
||||
dispatchEvent( 'resize', {
|
||||
'oldscale': oldscale,
|
||||
'scale': scale,
|
||||
'size': size
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
updateProgress();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue