Skip to content

Commit

Permalink
version 2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ganlanyuan committed Dec 12, 2018
1 parent 45c4bd8 commit 291b96a
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -15,7 +15,7 @@ Tiny-slider was strongly inspired by [Owl Carousel](https://owlcarousel2.github.
### Fire an issue
We can't test Tiny-slider on every browser and device. There are always some edge cases in which tiny-slider may not run properly. Fire an issue when it doesn't work for you. This not only helps you, also prevent others from facing the same issue.
**Notes for firing issues:**
- Before you fire an issue, make sure you update to the latest version of each main version. (e.g. v2.8.8 for version 2)
- Before you fire an issue, make sure you update to the latest version of each main version. (e.g. v2.9.0 for version 2)
- Provide the OS and browser version.
- Provide a link or your plugin options.

Expand Down
16 changes: 8 additions & 8 deletions README.md
@@ -1,6 +1,6 @@
# tiny-slider 2.0
[![](https://data.jsdelivr.com/v1/package/npm/tiny-slider/badge?style=rounded)](https://www.jsdelivr.com/package/npm/tiny-slider)
![version](https://img.shields.io/badge/Version-2.8.8-green.svg)
![version](https://img.shields.io/badge/Version-2.9.0-green.svg)
Tiny slider for all purposes, inspired by [Owl Carousel](https://owlcarousel2.github.io/OwlCarousel2/).
[Demos](http://ganlanyuan.github.io/tiny-slider/demo)
[Test results](http://ganlanyuan.github.io/tiny-slider/test)
Expand Down Expand Up @@ -211,8 +211,8 @@ Tiny slider for all purposes, inspired by [Owl Carousel](https://owlcarousel2.gi
## Usage
#### 1. Add CSS (and IE8 polyfills if needed)
```html
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.8.8/tiny-slider.css">
<!--[if (lt IE 9)]><script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.8.8/min/tiny-slider.helper.ie8.js"></script><![endif]-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.0/tiny-slider.css">
<!--[if (lt IE 9)]><script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.0/min/tiny-slider.helper.ie8.js"></script><![endif]-->
```

#### 2. Add markup
Expand All @@ -228,7 +228,7 @@ Tiny slider for all purposes, inspired by [Owl Carousel](https://owlcarousel2.gi
#### 3. Call tns()
Add tiny-slider.js to your page:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.8.8/min/tiny-slider.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tiny-slider/2.9.0/min/tiny-slider.js"></script>
<!-- NOTE: prior to v2.2.1 tiny-slider.js need to be in <body> -->
```

Expand All @@ -238,7 +238,7 @@ Or import `tns` via `webpack` or `rollup`:
import { tns } from "./node_modules/tiny-slider/src/tiny-slider"
```

Or import `tns` directly start from v2.8.8
Or import `tns` directly start from v2.9.0
```html
<script type="module">
import {tns} from './src/tiny-slider.js';
Expand Down Expand Up @@ -298,12 +298,12 @@ Or import `tns` directly start from v2.8.8
| `autoHeight` | Boolean | Default: false. <br> Height of slider container changes according to each slide's height. |
| `responsive` | Object: { <br>&emsp;breakpoint: { <br>&emsp;&emsp;key: value<br>&emsp;} <br>} \| false | Default: false. <br>Breakpoint: Integer.<br>Defines options for different viewport widths (see [Responsive Options](#responsive-options)). <br> |
| `lazyload` | Boolean | Default: false. <br> Enables lazyloading images that are currently not viewed, thus saving bandwidth (see [demo](http://ganlanyuan.github.io/tiny-slider/tests/#lazyload_wrapper)). <br> NOTE: <br>+ Class `.tns-lazy-img` need to be set on every image you want to lazyload if option `lazyloadSelector` is not specified; <br>+ `data-src` attribute with its value of the real image `src` is requierd; <br>+ `width` attribute for every image is required for `autoWidth` slider. |
| `lazyloadSelector` (v2.8.8+) | String | Default: `'.tns-lazy-img'`. <br> The CSS selector for lazyload images. |
| `lazyloadSelector` (v2.9.0+) | String | Default: `'.tns-lazy-img'`. <br> The CSS selector for lazyload images. |
| `touch` | Boolean | Default: true. <br> Activates input detection for touch devices. |
| `mouseDrag` | Boolean | Default: false. <br> Changing slides by dragging them. |
| `swipeAngle` | positive integer \| Boolean | Default: 15. <br> Swipe or drag will not be triggered if the angle is not inside the range when set. |
| `preventActionWhenRunning` (v2.8.8+) | Boolean | Default: false. <br> Prevent next transition while slider is transforming. |
| `preventScrollOnTouch` (v2.8.8+) | "auto" \| "force" \| false | Default: false. <br> Prevent page from scrolling on `touchmove`. If set to "auto", the slider will first check if the touch direction matches the slider axis, then decide whether prevent the page scrolling or not. If set to "force", the slider will always prevent the page scrolling. |
| `preventActionWhenRunning` (v2.9.0+) | Boolean | Default: false. <br> Prevent next transition while slider is transforming. |
| `preventScrollOnTouch` (v2.9.0+) | "auto" \| "force" \| false | Default: false. <br> Prevent page from scrolling on `touchmove`. If set to "auto", the slider will first check if the touch direction matches the slider axis, then decide whether prevent the page scrolling or not. If set to "force", the slider will always prevent the page scrolling. |
| `nested` | "inner" \| "outer" \| false | Default: false. <br> Difine the relationship between nested sliders. (see [demo](http://ganlanyuan.github.io/tiny-slider/demo/#nested_wrapper)) <br>Make sure you run the inner slider first, otherwise the height of the inner slider container will be wrong. |
| `freezable` | Boolean | Default: true. <br> Indicate whether the slider will be frozen (`controls`, `nav`, `autoplay` and other functions will stop work) when all slides can be displayed in one page. |
| `disable` | Boolean | Default: false. <br> Disable slider. |
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "tiny-slider",
"version": "2.8.8",
"version": "2.9.0",
"homepage": "https://github.com/ganlanyuan/tiny-slider",
"authors": [
"WilliamLin <ganlanyuan@gmail.com>"
Expand Down
2 changes: 1 addition & 1 deletion dist/min/tiny-slider.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/sourcemaps/tiny-slider.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/tiny-slider.js
Expand Up @@ -3160,7 +3160,7 @@ var tns = function(options) {
}

return {
version: '2.8.8',
version: '2.9.0',
getInfo: info,
events: events,
goTo: goTo,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "tiny-slider",
"version": "2.8.8",
"version": "2.9.0",
"description": "Vanilla javascript slider for all purposes, inspired by Owl Carousel.",
"main": "dist/tiny-slider.js",
"types": "src/tiny-slider.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/tiny-slider.js
Expand Up @@ -2727,7 +2727,7 @@ export var tns = function(options) {
}

return {
version: '2.8.8',
version: '2.9.0',
getInfo: info,
events: events,
goTo: goTo,
Expand Down
2 changes: 1 addition & 1 deletion src/tiny-slider.module.js
Expand Up @@ -2727,7 +2727,7 @@ export var tns = function(options) {
}

return {
version: '2.8.8',
version: '2.9.0',
getInfo: info,
events: events,
goTo: goTo,
Expand Down
2 changes: 1 addition & 1 deletion src/tiny-slider.scss
@@ -1,4 +1,4 @@
// Version: 2.8.8
// Version: 2.9.0

.tns-outer {
padding: 0 !important; // remove padding: clientWidth = width + padding (0) = width
Expand Down

0 comments on commit 291b96a

Please sign in to comment.