@apatheticwes/scrollify
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -672,4 +672,4 @@ 'use strict'; | ||
function translateX(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 0; | ||
var offset = (to - from) * progress + from; | ||
@@ -687,4 +687,4 @@ | ||
function translateY(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 0;// this.transforms.position[1]; | ||
var offset = (to - from) * progress + from; | ||
@@ -714,4 +714,4 @@ | ||
function scale(progress) { | ||
var to = parseFloat(this.options.to) || 1; | ||
var from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
var to = (this.options.to !== undefined) ? this.options.to : 1; | ||
var from = (this.options.from !== undefined) ? this.options.from : this.transforms.scale[0]; | ||
var scale = (to - from) * progress + from; | ||
@@ -730,4 +730,4 @@ | ||
function fade(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 1; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 1; | ||
var opacity = (to - from) * progress + from; | ||
@@ -734,0 +734,0 @@ |
@@ -668,4 +668,4 @@ /** | ||
function translateX(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 0; | ||
var offset = (to - from) * progress + from; | ||
@@ -683,4 +683,4 @@ | ||
function translateY(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 0;// this.transforms.position[1]; | ||
var offset = (to - from) * progress + from; | ||
@@ -710,4 +710,4 @@ | ||
function scale(progress) { | ||
var to = parseFloat(this.options.to) || 1; | ||
var from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
var to = (this.options.to !== undefined) ? this.options.to : 1; | ||
var from = (this.options.from !== undefined) ? this.options.from : this.transforms.scale[0]; | ||
var scale = (to - from) * progress + from; | ||
@@ -726,4 +726,4 @@ | ||
function fade(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 1; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 1; | ||
var opacity = (to - from) * progress + from; | ||
@@ -730,0 +730,0 @@ |
@@ -671,4 +671,4 @@ (function () { | ||
function translateX(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 0; | ||
var offset = (to - from) * progress + from; | ||
@@ -686,4 +686,4 @@ | ||
function translateY(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 0;// this.transforms.position[1]; | ||
var offset = (to - from) * progress + from; | ||
@@ -713,4 +713,4 @@ | ||
function scale(progress) { | ||
var to = parseFloat(this.options.to) || 1; | ||
var from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
var to = (this.options.to !== undefined) ? this.options.to : 1; | ||
var from = (this.options.from !== undefined) ? this.options.from : this.transforms.scale[0]; | ||
var scale = (to - from) * progress + from; | ||
@@ -729,4 +729,4 @@ | ||
function fade(progress) { | ||
var to = parseFloat(this.options.to) || 0; | ||
var from = parseFloat(this.options.from) || 1; | ||
var to = (this.options.to !== undefined) ? this.options.to : 0; | ||
var from = (this.options.from !== undefined) ? this.options.from : 1; | ||
var opacity = (to - from) * progress + from; | ||
@@ -733,0 +733,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "A simple thing for triggering 'them scroll effects that everybody loves", | ||
@@ -8,0 +8,0 @@ "main": "./dist/scrollify.cjs.js", |
@@ -22,5 +22,5 @@ /** | ||
export function translateX(progress) { | ||
let to = parseFloat(this.options.to) || 0; | ||
let from = parseFloat(this.options.from) || 0; | ||
let offset = (to - from) * progress + from; | ||
const to = (this.options.to !== undefined) ? this.options.to : 0; | ||
const from = (this.options.from !== undefined) ? this.options.from : 0; | ||
const offset = (to - from) * progress + from; | ||
@@ -37,5 +37,5 @@ this.transforms.position[0] = offset; | ||
export function translateY(progress) { | ||
let to = parseFloat(this.options.to) || 0; | ||
let from = parseFloat(this.options.from) || 0; // this.transforms.position[1]; | ||
let offset = (to - from) * progress + from; | ||
const to = (this.options.to !== undefined) ? this.options.to : 0; | ||
const from = (this.options.from !== undefined) ? this.options.from : 0;// this.transforms.position[1]; | ||
const offset = (to - from) * progress + from; | ||
@@ -64,4 +64,4 @@ this.transforms.position[1] = offset; | ||
export function scale(progress) { | ||
const to = parseFloat(this.options.to) || 1; | ||
const from = parseFloat(this.options.from) || this.transforms.scale[0]; | ||
const to = (this.options.to !== undefined) ? this.options.to : 1; | ||
const from = (this.options.from !== undefined) ? this.options.from : this.transforms.scale[0]; | ||
const scale = (to - from) * progress + from; | ||
@@ -80,4 +80,4 @@ | ||
export function fade(progress) { | ||
const to = parseFloat(this.options.to) || 0; | ||
const from = parseFloat(this.options.from) || 1; | ||
const to = (this.options.to !== undefined) ? this.options.to : 0; | ||
const from = (this.options.from !== undefined) ? this.options.from : 1; | ||
const opacity = (to - from) * progress + from; | ||
@@ -84,0 +84,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
770812