Skip to content

Commit d4de081

Browse files
committed
v2.2.1
1 parent 586440c commit d4de081

15 files changed

+46
-29
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [2.2.1] - May 4, 2024
4+
5+
- added support for boolean in `disableParallax` and `disableVideo` options
6+
- fixed `jarallaxVideo` support in typings (#224)
7+
38
## [2.2.0] - Jan 27, 2024
49

510
- updated video worker:

dist/jarallax-video.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax-video.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.cjs

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Jarallax v2.2.0 (https://github.com/nk-o/jarallax)
2+
* Jarallax v2.2.1 (https://github.com/nk-o/jarallax)
33
* Copyright 2024 nK <https://nkdev.info>
44
* Licensed under MIT (https://github.com/nk-o/jarallax/blob/master/LICENSE)
55
*/
@@ -290,7 +290,9 @@ class Jarallax {
290290
self.options.disableParallax = () => disableParallaxRegexp.test(navigator.userAgent);
291291
}
292292
if (typeof self.options.disableParallax !== 'function') {
293-
self.options.disableParallax = () => false;
293+
// Support for `true` option value.
294+
const disableParallaxDefault = self.options.disableParallax;
295+
self.options.disableParallax = () => disableParallaxDefault === true;
294296
}
295297

296298
// prepare disableVideo callback
@@ -302,7 +304,9 @@ class Jarallax {
302304
self.options.disableVideo = () => disableVideoRegexp.test(navigator.userAgent);
303305
}
304306
if (typeof self.options.disableVideo !== 'function') {
305-
self.options.disableVideo = () => false;
307+
// Support for `true` option value.
308+
const disableVideoDefault = self.options.disableVideo;
309+
self.options.disableVideo = () => disableVideoDefault === true;
306310
}
307311

308312
// custom element to check if parallax in viewport

dist/jarallax.cjs.map

+1-1
Large diffs are not rendered by default.

dist/jarallax.esm.js

+7-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.esm.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.esm.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.esm.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.js

+7-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jarallax.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jarallax",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Smooth parallax scrolling effect for background images, videos and inline elements. Code in pure JavaScript with NO dependencies + jQuery supported. Youtube, Vimeo and Local Videos parallax supported.",
55
"license": "MIT",
66
"homepage": "https://github.com/nk-o/jarallax",

0 commit comments

Comments
 (0)