Skip to content

Commit 7bdc239

Browse files
committed
🇬🇧 Fixed motion calculation.
1 parent 81f33cb commit 7bdc239

6 files changed

+10
-10
lines changed

deploy/jquery.parallax.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@
387387
this.mx = this.calibrateX ? dx : this.ix;
388388
this.my = this.calibrateY ? dy : this.iy;
389389
}
390-
this.mx *= this.ew / this.scalarX;
391-
this.my *= this.eh / this.scalarY;
390+
this.mx *= this.ew * (this.scalarX / 100);
391+
this.my *= this.eh * (this.scalarY / 100);
392392
if (!isNaN(parseFloat(this.limitX))) {
393393
this.mx = this.clamp(this.mx, -this.limitX, this.limitX);
394394
}

deploy/jquery.parallax.min.js

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

deploy/parallax.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@
412412
this.mx = this.calibrateX ? dx : this.ix;
413413
this.my = this.calibrateY ? dy : this.iy;
414414
}
415-
this.mx *= this.ew / this.scalarX;
416-
this.my *= this.eh / this.scalarY;
415+
this.mx *= this.ew * (this.scalarX / 100);
416+
this.my *= this.eh * (this.scalarY / 100);
417417
if (!isNaN(parseFloat(this.limitX))) {
418418
this.mx = this.clamp(this.mx, -this.limitX, this.limitX);
419419
}

0 commit comments

Comments
 (0)