|
@@ -1016,20 +1016,10 @@ export default function( revealElement, options ) {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- if( typeof config.scrollActivationWidth === 'number' && config.view !== 'scroll' ) {
|
|
|
|
- if( size.presentationWidth > 0 && size.presentationWidth <= config.scrollActivationWidth ) {
|
|
|
|
- if( !scrollView.isActive() ) scrollView.activate();
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- if( scrollView.isActive() ) scrollView.deactivate();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ checkResponsiveScrollView();
|
|
|
|
+
|
|
dom.viewport.style.setProperty( '--slide-scale', scale );
|
|
dom.viewport.style.setProperty( '--slide-scale', scale );
|
|
dom.viewport.style.setProperty( '--viewport-width', viewportWidth + 'px' );
|
|
dom.viewport.style.setProperty( '--viewport-width', viewportWidth + 'px' );
|
|
dom.viewport.style.setProperty( '--viewport-height', viewportHeight + 'px' );
|
|
dom.viewport.style.setProperty( '--viewport-height', viewportHeight + 'px' );
|
|
@@ -1081,6 +1071,40 @@ export default function( revealElement, options ) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ * Responsively activates the scroll mode when we reach the configured
|
|
|
|
+ * activation width.
|
|
|
|
+ */
|
|
|
|
+ function checkResponsiveScrollView() {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if(
|
|
|
|
+ dom.wrapper &&
|
|
|
|
+ !config.disableLayout &&
|
|
|
|
+ !printView.isActive() &&
|
|
|
|
+ typeof config.scrollActivationWidth === 'number' &&
|
|
|
|
+ config.view !== 'scroll'
|
|
|
|
+ ) {
|
|
|
|
+ const size = getComputedSlideSize();
|
|
|
|
+
|
|
|
|
+ if( size.presentationWidth > 0 && size.presentationWidth <= config.scrollActivationWidth ) {
|
|
|
|
+ if( !scrollView.isActive() ) {
|
|
|
|
+ backgrounds.create();
|
|
|
|
+ scrollView.activate()
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ if( scrollView.isActive() ) scrollView.deactivate();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
* Calculates the computed pixel size of our slides. These
|
|
* Calculates the computed pixel size of our slides. These
|
|
* values are based on the width and height configuration
|
|
* values are based on the width and height configuration
|
|
@@ -2700,7 +2724,6 @@ export default function( revealElement, options ) {
|
|
function onWindowResize( event ) {
|
|
function onWindowResize( event ) {
|
|
|
|
|
|
layout();
|
|
layout();
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|