Browse Source

Tweak comments.

NaotoshiFujita 3 years ago
parent
commit
edb9d44575

+ 4 - 3
src/js/components/Media/Media.ts

@@ -7,16 +7,17 @@ import { merge, omit, ownKeys } from '../../utils';
 
 
 /**
- * The interface for the Options component.
+ * The interface for the Media component.
  *
- * @since 3.0.0
+ * @since 4.0.0
  */
 export interface MediaComponent extends BaseComponent {
   reduce( reduced: boolean ): void;
 }
 
 /**
- * The component for observing media queries and update options if necessary.
+ * The component for observing media queries and updating options if necessary.
+ * This used to be the Options component.
  *
  * @since 4.0.0
  *

+ 14 - 0
src/js/test/php/examples/breakpoints.php

@@ -16,25 +16,39 @@ $settings = get_settings();
   <link rel="stylesheet" href="../../assets/css/styles.css">
   <script src="../../../../../dist/js/splide.js"></script>
 
+	<style>
+		.splide__slide {
+			overflow: hidden;
+		}
+	</style>
+
   <script>
     document.addEventListener( 'DOMContentLoaded', function () {
 			const options = {
 				perPage    : 3,
 				arrows     : false,
 				mediaQuery : 'max',
+				// destroy: true,
 				breakpoints: {
 					1200: {
 						perPage: 1,
 						gap    : '1rem',
 						arrows : true,
 						padding: 50,
+						// direction: 'ttb',
+						height: 500,
+						destroy: false,
+						// paginationDirection: 'ltr',
 					},
 					1000: {
+						// direction: 'ltr',
 						perPage   : 2,
 						gap       : 0,
 						arrows    : false,
 						padding   : 0,
 						pagination: false,
+						// destroy: false,
+						// height: undefined,
 					},
 					800 : {
 						destroy: true,

+ 2 - 1
src/js/test/php/examples/default.php

@@ -31,6 +31,7 @@ $settings = get_settings();
 	      direction   : 'ltr',
 	      height      : undefined,
 	      paginationDirection: 'ttb',
+	      rewindSpeed : 2000,
 
 	      breakpoints: {
 					1200: {
@@ -39,7 +40,7 @@ $settings = get_settings();
 						perPage  : 2,
 					},
 		      1000: {
-						destroy: true,
+			      direction: 'ltr',
 		      }
 	      }
       } );