ignore calculating scale if only possible outcome is 1
This commit is contained in:
parent
3126db0a46
commit
96b1ee9c39
|
@ -125,13 +125,13 @@
|
|||
theme: null,
|
||||
|
||||
// Transition style
|
||||
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
||||
transition: 'default', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// Transition speed
|
||||
transitionSpeed: 'default', // default/fast/slow
|
||||
|
||||
// Transition style for full page slide backgrounds
|
||||
backgroundTransition: 'slide', // none/fade/slide/convex/concave/zoom
|
||||
backgroundTransition: 'default', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// Parallax background image
|
||||
parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg"
|
||||
|
@ -1469,6 +1469,9 @@
|
|||
dom.slides.style.width = size.width + 'px';
|
||||
dom.slides.style.height = size.height + 'px';
|
||||
|
||||
// No point in calculating scale if the only possible
|
||||
// result is 1
|
||||
if( config.minScale !== 1 || config.maxScale !== 1 ) {
|
||||
// Determine scale of content to fit within available space
|
||||
scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height );
|
||||
|
||||
|
@ -1488,6 +1491,7 @@
|
|||
dom.slides.style.right = 'auto';
|
||||
transformElement( dom.slides, 'translate(-50%, -50%) scale('+ scale +')' );
|
||||
}
|
||||
}
|
||||
|
||||
// Select all slides, vertical and horizontal
|
||||
var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) );
|
||||
|
|
Loading…
Reference in New Issue
Block a user