Skip to content

Commit

Permalink
Fix destroy method and update to version 1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
micku7zu committed Aug 15, 2023
1 parent f4a5579 commit 967ab1a
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 16 deletions.
7 changes: 5 additions & 2 deletions dist/vanilla-tilt.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var classCallCheck = function (instance, Constructor) {
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
* Original idea: https://github.com/gijsroge/tilt.js
* MIT License.
* Version 1.8.0
* Version 1.8.1
*/

var VanillaTilt = function () {
Expand Down Expand Up @@ -154,7 +154,10 @@ var VanillaTilt = function () {
cancelAnimationFrame(this.updateCall);
}

this.reset();
this.element.style.willChange = "";
this.element.style.transition = "";
this.element.style.transform = "";
this.resetGlare();

this.removeEventListeners();
this.element.vanillaTilt = null;
Expand Down
2 changes: 1 addition & 1 deletion dist/vanilla-tilt.babel.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions dist/vanilla-tilt.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var VanillaTilt = (function () {
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
* Original idea: https://github.com/gijsroge/tilt.js
* MIT License.
* Version 1.8.0
* Version 1.8.1
*/

class VanillaTilt {
Expand Down Expand Up @@ -139,7 +139,10 @@ class VanillaTilt {
cancelAnimationFrame(this.updateCall);
}

this.reset();
this.element.style.willChange = "";
this.element.style.transition = "";
this.element.style.transform = "";
this.resetGlare();

this.removeEventListeners();
this.element.vanillaTilt = null;
Expand Down
2 changes: 1 addition & 1 deletion dist/vanilla-tilt.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions lib/vanilla-tilt.es2015.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
* Original idea: https://github.com/gijsroge/tilt.js
* MIT License.
* Version 1.8.0
* Version 1.8.1
*/

class VanillaTilt {
Expand Down Expand Up @@ -136,7 +136,10 @@ class VanillaTilt {
cancelAnimationFrame(this.updateCall);
}

this.reset();
this.element.style.willChange = "";
this.element.style.transition = "";
this.element.style.transform = "";
this.resetGlare();

this.removeEventListeners();
this.element.vanillaTilt = null;
Expand Down
7 changes: 5 additions & 2 deletions lib/vanilla-tilt.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var classCallCheck = function (instance, Constructor) {
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
* Original idea: https://github.com/gijsroge/tilt.js
* MIT License.
* Version 1.8.0
* Version 1.8.1
*/

var VanillaTilt = function () {
Expand Down Expand Up @@ -153,7 +153,10 @@ var VanillaTilt = function () {
cancelAnimationFrame(this.updateCall);
}

this.reset();
this.element.style.willChange = "";
this.element.style.transition = "";
this.element.style.transform = "";
this.resetGlare();

this.removeEventListeners();
this.element.vanillaTilt = null;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vanilla-tilt",
"version": "1.8.0",
"version": "1.8.1",
"description": "A smooth 3D tilt javascript library forked from Tilt.js",
"main": "lib/vanilla-tilt.js",
"module_es2015": "lib/vanilla-tilt.es2015.js",
Expand Down
7 changes: 5 additions & 2 deletions src/vanilla-tilt.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Created by Sergiu Șandor (micku7zu) on 1/27/2017.
* Original idea: https://github.com/gijsroge/tilt.js
* MIT License.
* Version 1.8.0
* Version 1.8.1
*/

export default class VanillaTilt {
Expand Down Expand Up @@ -136,7 +136,10 @@ export default class VanillaTilt {
cancelAnimationFrame(this.updateCall);
}

this.reset();
this.element.style.willChange = "";
this.element.style.transition = "";
this.element.style.transform = "";
this.resetGlare();

this.removeEventListeners();
this.element.vanillaTilt = null;
Expand Down
2 changes: 1 addition & 1 deletion vanilla-tilt.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Extended Type definitions for vanilla-tilt 1.8.0
// Extended Type definitions for vanilla-tilt 1.8.1
// Project: https://github.com/micku7zu/vanilla-tilt.js
// Definitions by: Livio Brunner <https://github.com/BrunnerLivio>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
Expand Down

0 comments on commit 967ab1a

Please sign in to comment.