Skip to content

Commit

Permalink
Merge pull request #11 from mickaelchanrion/fix-option-defaults
Browse files Browse the repository at this point in the history
Fix option defaults
  • Loading branch information
mickaelchanrion authored Apr 26, 2020
2 parents 8e3f78b + c71bd84 commit dd15614
Show file tree
Hide file tree
Showing 7 changed files with 4,826 additions and 3,729 deletions.
8 changes: 4 additions & 4 deletions dist/rolly.esm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* rolly.js v0.3.6
* (c) 2019 Mickael Chanrion
* rolly.js v0.4.0
* (c) 2020 Mickael Chanrion
* Released under the MIT license
*/

Expand Down Expand Up @@ -797,7 +797,7 @@ var privated = {
if (images.length === 0) { callback(); }
};

img.src = image.getAttribute('src');
img.src = image.currentSrc || image.src;
});
},

Expand Down Expand Up @@ -850,7 +850,7 @@ var privated = {
vertical: true,
listener: document.body,
view: utils.getElements('.rolly-view')[0] || null,
native: false,
native: true,
preload: true,
autoUpdate: true,
ready: function () { },
Expand Down
6 changes: 3 additions & 3 deletions dist/rolly.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/rolly.umd.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* rolly.js v0.3.6
* (c) 2019 Mickael Chanrion
* rolly.js v0.4.0
* (c) 2020 Mickael Chanrion
* Released under the MIT license
*/

Expand Down Expand Up @@ -1402,7 +1402,7 @@
if (images.length === 0) { callback(); }
};

img.src = image.getAttribute('src');
img.src = image.currentSrc || image.src;
});
},

Expand Down Expand Up @@ -1455,7 +1455,7 @@
vertical: true,
listener: document.body,
view: utils.getElements('.rolly-view')[0] || null,
native: false,
native: true,
preload: true,
autoUpdate: true,
ready: function () { },
Expand Down
8 changes: 4 additions & 4 deletions docs/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@ The element that contains all the scenes.
If true, Rolly will use the native scroll bar and the native scroll behavior. Otherwise, Rolly will instantiate [virtual-scroll](https://github.com/ayamflow/virtual-scroll) and create a custom scroll bar.

- type: `Boolean`
- default: `false`
- default: `true`

### preload

If true, Rolly will load every images contained in the scenes and then, refresh the cache and call the [ready](#ready) callback.

- type: `Boolean`
- default: `false`
- default: `true`

### autoUpdate

If true, Rolly will listen for resize events and refresh the cache according the new layout of the view.
If true, Rolly will listen for resize events and refresh the size of the scenes, etc.

- type: `Boolean`
- default: `true`
Expand Down Expand Up @@ -119,7 +119,7 @@ Whether to display a custom scroll bar if the [native](#native) option is false.
- default: `false`

::: tip
For some projects, this option is useful. But most of the time, the non-presence of a scroll bar might ending-up with an UX issue.
For UX reasons, it is highly recommended to keep a scrollbar.
:::

### scenes
Expand Down
Loading

0 comments on commit dd15614

Please sign in to comment.