提交 2f70956c 编写于 作者: J Julian Lloyd

ScrollReveal v4.0.4

上级 d6948e54
# Change Log
## [4.0.4] - 2018-09-22
### Fixed
- Malformed `package.json`
## [4.0.3] - 2018-09-21
### Fixed
......@@ -481,6 +487,7 @@ This version marks a significant change in how developers use ScrollReveal, intr
### Hello World
[4.0.4]: https://github.com/scrollreveal/scrollreveal/compare/v4.0.4...v4.0.4
[4.0.3]: https://github.com/scrollreveal/scrollreveal/compare/v4.0.2...v4.0.3
[4.0.2]: https://github.com/scrollreveal/scrollreveal/compare/v4.0.1...v4.0.2
[4.0.1]: https://github.com/scrollreveal/scrollreveal/compare/v4.0.0...v4.0.1
......
/*! @license ScrollReveal v4.0.3
/*! @license ScrollReveal v4.0.4
Copyright 2018 Fisssion LLC.
......@@ -1067,7 +1067,7 @@ function transitionSupported() {
return 'transition' in style || 'WebkitTransition' in style
}
var version = "4.0.3";
var version = "4.0.4";
var boundDelegate;
var boundDestroy;
......
/*! @license ScrollReveal v4.0.3
/*! @license ScrollReveal v4.0.4
Copyright 2018 Fisssion LLC.
......@@ -144,7 +144,7 @@ function isDomNodeList(x) {
(x.length === 0 || isDomNode(x[0]))
}
/*! @license Tealight v0.3.0
/*! @license Tealight v0.3.6
Copyright 2018 Fisssion LLC.
......@@ -167,21 +167,21 @@ function isDomNodeList(x) {
SOFTWARE.
*/
function index(target, context) {
if ( context === void 0 ) { context = document; }
if (target instanceof Array) { return target.filter(isDomNode) }
if (isDomNode(target)) { return [target] }
if (isDomNodeList(target)) { return Array.prototype.slice.call(target) }
if (typeof target === 'string') {
try {
var query = context.querySelectorAll(target);
return Array.prototype.slice.call(query)
} catch (err) {
return []
}
}
return []
function tealight(target, context) {
if ( context === void 0 ) { context = document; }
if (target instanceof Array) { return target.filter(isDomNode); }
if (isDomNode(target)) { return [target]; }
if (isDomNodeList(target)) { return Array.prototype.slice.call(target); }
if (typeof target === "string") {
try {
var query = context.querySelectorAll(target);
return Array.prototype.slice.call(query);
} catch (err) {
return [];
}
}
return [];
}
function isObject(x) {
......@@ -231,7 +231,7 @@ function rinse() {
* Take stock of active element IDs.
*/
try {
each(index('[data-sr-id]'), function (node) {
each(tealight('[data-sr-id]'), function (node) {
var id = parseInt(node.getAttribute('data-sr-id'));
elementIds.active.push(id);
});
......@@ -296,7 +296,7 @@ function clean(target) {
var dirty;
try {
each(index(target), function (node) {
each(tealight(target), function (node) {
var id = node.getAttribute('data-sr-id');
if (id !== null) {
dirty = true;
......@@ -354,9 +354,9 @@ function destroy() {
};
}
/*! @license Rematrix v0.2.2
/*! @license Rematrix v0.3.0
Copyright 2018 Fisssion LLC.
Copyright 2018 Julian Lloyd.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......@@ -466,11 +466,10 @@ function multiply(m, x) {
* matrix passed in, but will return the identity matrix as a
* fallback.
*
* **Tip:** In virtually all cases, this method is used to convert
* a CSS matrix (retrieved as a `string` from computed styles) to
* its equivalent array format.
* > **Tip:** This method is used to convert a CSS matrix (retrieved as a
* `string` from computed styles) to its equivalent array format.
*
* @param {string} source - String containing a valid CSS `matrix` or `matrix3d` property.
* @param {string} source - `matrix` or `matrix3d` CSS Transform value.
* @return {array}
*/
function parse(source) {
......@@ -1112,7 +1111,7 @@ function reveal(target, options, syncing) {
sequence$$1 = new Sequence(interval);
}
var nodes = index(target);
var nodes = tealight(target);
if (!nodes.length) {
throw new Error('Invalid reveal target.')
}
......@@ -1147,7 +1146,7 @@ function reveal(target, options, syncing) {
return elementBuffer // skip elements that are disabled
}
var containerNode = index(config.container)[0];
var containerNode = tealight(config.container)[0];
if (!containerNode) {
throw new Error('Invalid container.')
}
......@@ -1298,7 +1297,7 @@ var polyfill$1 = (function () {
}
})();
var index$1 = window.requestAnimationFrame ||
var index = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
polyfill$1;
......@@ -1390,7 +1389,7 @@ function delegate(
if ( event === void 0 ) event = { type: 'init' };
if ( elements === void 0 ) elements = this.store.elements;
index$1(function () {
index(function () {
var stale = event.type === 'init' || event.type === 'resize';
each(this$1.store.containers, function (container) {
......@@ -1442,7 +1441,7 @@ function transitionSupported() {
return 'transition' in style || 'WebkitTransition' in style
}
var version = "4.0.3";
var version = "4.0.4";
var boundDelegate;
var boundDestroy;
......@@ -1480,7 +1479,7 @@ function ScrollReveal(options) {
}
try {
var container = index(buffer.container)[0];
var container = tealight(buffer.container)[0];
if (!container) {
throw new Error('Invalid container.')
}
......
此差异已折叠。
{
"name": "scrollreveal",
"version": "4.0.3",
"version": "4.0.4",
"description": "Animate elements as they scroll into view",
"homepage": "https://scrollrevealjs.org",
"main": "dist/scrollreveal.js",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册