Ver código fonte

Make wheel options responsive.

Naotoshi Fujita 2 anos atrás
pai
commit
1f3f3a51f8
2 arquivos alterados com 49 adições e 49 exclusões
  1. 22 22
      dist/types/index.d.ts
  2. 27 27
      src/js/types/options.ts

+ 22 - 22
dist/types/index.d.ts

@@ -473,28 +473,6 @@ interface Options extends ResponsiveOptions {
      * - `false`: Disables keyboard shortcuts (default).
      */
     keyboard?: boolean | 'global' | 'focused';
-    /**
-     * Enables navigation by the mouse wheel.
-     * You'll need to set `waitForTransition` to `ture` or provide the `wheelSleep` duration to avoid quick change.
-     */
-    wheel?: boolean;
-    /**
-     * Determines the wheel axis. The default value is 'y'.
-     */
-    wheelAxis?: 'x' | 'y' | 'xy';
-    /**
-     * The threshold to cut off the small delta produced by inertia scroll.
-     */
-    wheelMinThreshold?: number;
-    /**
-     * The sleep time in milliseconds until accepting next wheel.
-     * The timer starts when the transition begins.
-     */
-    wheelSleep?: number;
-    /**
-     * Determines whether to release the wheel event when the carousel reaches the first or last slide.
-     */
-    releaseWheel?: boolean;
     /**
      * Determines whether to release the touch event when the carousel reaches the first or last slide.
      * If `true`, the bounce effect will not play.
@@ -751,6 +729,28 @@ interface ResponsiveOptions {
      * Limits the number of pages to move by "flick".
      */
     flickMaxPages?: number;
+    /**
+     * Enables navigation by the mouse wheel.
+     * You'll need to set `waitForTransition` to `ture` or provide the `wheelSleep` duration to avoid quick change.
+     */
+    wheel?: boolean;
+    /**
+     * Determines the wheel axis. The default value is 'y'.
+     */
+    wheelAxis?: 'x' | 'y' | 'xy';
+    /**
+     * The threshold to cut off the small delta produced by inertia scroll.
+     */
+    wheelMinThreshold?: number;
+    /**
+     * The sleep time in milliseconds until accepting next wheel.
+     * The timer starts when the transition begins.
+     */
+    wheelSleep?: number;
+    /**
+     * Determines whether to release the wheel event when the carousel reaches the first or last slide.
+     */
+    releaseWheel?: boolean;
     /**
      * Destroys the slider.
      */

+ 27 - 27
src/js/types/options.ts

@@ -102,33 +102,6 @@ export interface Options extends ResponsiveOptions {
    */
   keyboard?: boolean | 'global' | 'focused';
 
-  /**
-   * Enables navigation by the mouse wheel.
-   * You'll need to set `waitForTransition` to `ture` or provide the `wheelSleep` duration to avoid quick change.
-   */
-  wheel?: boolean;
-
-  /**
-   * Determines the wheel axis. The default value is 'y'.
-   */
-  wheelAxis?: 'x' | 'y' | 'xy';
-
-  /**
-   * The threshold to cut off the small delta produced by inertia scroll.
-   */
-  wheelMinThreshold?: number;
-
-  /**
-   * The sleep time in milliseconds until accepting next wheel.
-   * The timer starts when the transition begins.
-   */
-  wheelSleep?: number;
-
-  /**
-   * Determines whether to release the wheel event when the carousel reaches the first or last slide.
-   */
-  releaseWheel?: boolean;
-
   /**
    * Determines whether to release the touch event when the carousel reaches the first or last slide.
    * If `true`, the bounce effect will not play.
@@ -426,6 +399,33 @@ export interface ResponsiveOptions {
    */
   flickMaxPages?: number;
 
+  /**
+   * Enables navigation by the mouse wheel.
+   * You'll need to set `waitForTransition` to `ture` or provide the `wheelSleep` duration to avoid quick change.
+   */
+  wheel?: boolean;
+
+  /**
+   * Determines the wheel axis. The default value is 'y'.
+   */
+  wheelAxis?: 'x' | 'y' | 'xy';
+
+  /**
+   * The threshold to cut off the small delta produced by inertia scroll.
+   */
+  wheelMinThreshold?: number;
+
+  /**
+   * The sleep time in milliseconds until accepting next wheel.
+   * The timer starts when the transition begins.
+   */
+  wheelSleep?: number;
+
+  /**
+   * Determines whether to release the wheel event when the carousel reaches the first or last slide.
+   */
+  releaseWheel?: boolean;
+
   /**
    * Destroys the slider.
    */