ソースを参照

Return the splide instance in some APIs.

NaotoshiFujita 5 年 前
コミット
33fbf23863
6 ファイル変更14 行追加4 行削除
  1. 6 1
      dist/js/splide.js
  2. 1 1
      dist/js/splide.min.js
  3. BIN
      dist/js/splide.min.js.gz
  4. 1 1
      package-lock.json
  5. 1 1
      package.json
  6. 5 0
      src/js/splide.js

+ 6 - 1
dist/js/splide.js

@@ -1,6 +1,6 @@
 /*!
  * Splide.js
- * Version  : 1.4.0
+ * Version  : 1.4.1
  * License  : MIT
  * Copyright: 2019 Naotoshi Fujita
  */
@@ -1516,6 +1516,8 @@ function () {
     if (this.State.is(IDLE) || this.State.is(MOVING) && !wait) {
       this.Components.Controller.go(control, false);
     }
+
+    return this;
   }
   /**
    * Verify whether the slider type is the given one or not.
@@ -1544,6 +1546,7 @@ function () {
 
     this.Components.Elements.add(slide, index);
     this.refresh();
+    return this;
   }
   /**
    * Remove the slide designated by the index.
@@ -1555,6 +1558,7 @@ function () {
   _proto.remove = function remove(index) {
     this.Components.Elements.remove(index);
     this.refresh();
+    return this;
   }
   /**
    * Destroy all Slide objects and clones and recreate them again.
@@ -1564,6 +1568,7 @@ function () {
 
   _proto.refresh = function refresh() {
     this.emit('refresh').emit('updated', this.options);
+    return this;
   }
   /**
    * Destroy the Splide.

ファイルの差分が大きいため隠しています
+ 1 - 1
dist/js/splide.min.js


BIN
dist/js/splide.min.js.gz


+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "@splidejs/splide",
-  "version": "1.4.0",
+  "version": "1.4.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@splidejs/splide",
-  "version": "1.4.0",
+  "version": "1.4.1",
   "description": "Splide is a lightweight and powerful slider without any dependencies.",
   "author": "Naotoshi Fujita",
   "license": "MIT",

+ 5 - 0
src/js/splide.js

@@ -152,6 +152,8 @@ export default class Splide {
 		if ( this.State.is( STATES.IDLE ) || ( this.State.is( STATES.MOVING ) && ! wait ) ) {
 			this.Components.Controller.go( control, false );
 		}
+
+		return this;
 	}
 
 	/**
@@ -174,6 +176,7 @@ export default class Splide {
 	add( slide, index = -1 ) {
 		this.Components.Elements.add( slide, index );
 		this.refresh();
+		return this;
 	}
 
 	/**
@@ -184,6 +187,7 @@ export default class Splide {
 	remove( index ) {
 		this.Components.Elements.remove( index );
 		this.refresh();
+		return this;
 	}
 
 	/**
@@ -192,6 +196,7 @@ export default class Splide {
 	 */
 	refresh() {
 		this.emit( 'refresh' ).emit( 'updated', this.options );
+		return this;
 	}
 
 	/**

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません