Skip to content

Commit

Permalink
ScrollReveal v4.0.0-beta.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmakes committed Jun 2, 2017
1 parent 6c1c3c9 commit 49fab33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions dist/scrollreveal.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function transitionSupported () {

function isElementVisible (element) {
var container = this.store.containers[element.containerId];
var viewFactor = element.config.viewFactor;
var viewFactor = Math.max(0, Math.min(1, element.config.viewFactor));
var viewOffset = element.config.viewOffset;

var elementBounds = {
Expand Down Expand Up @@ -724,7 +724,11 @@ function style (element) {
if (config.rotate.x) { transformations.push(rotateX(config.rotate.x)); }
if (config.rotate.y) { transformations.push(rotateY(config.rotate.y)); }
if (config.rotate.z) { transformations.push(rotateZ(config.rotate.z)); }
if (config.scale !== 1) { transformations.push(scale(config.scale)); }
if (config.scale !== 1) {
config.scale === 0
? transformations.push(scale(0.001))
: transformations.push(scale(config.scale));
}

var transform = {};
if (transformations.length) {
Expand Down Expand Up @@ -1228,6 +1232,7 @@ function delegate (event) {
});
each(elements, function (element) {
element.geometry = getGeometry.call(this$1, element);
element.styles = style(element);
animate.call(this$1, element);
});
}
Expand All @@ -1236,7 +1241,7 @@ function delegate (event) {
});
}

var version = "4.0.0-beta.7";
var version = "4.0.0-beta.8";

function ScrollReveal (options) {
var this$1 = this;
Expand Down
Loading

0 comments on commit 49fab33

Please sign in to comment.