Fix destroy method and update to version 1.8.1

This commit is contained in:
micku7zu 2023-08-15 12:47:15 +03:00
parent f4a557955d
commit 967ab1accf
10 changed files with 31 additions and 16 deletions

View file

@ -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 () {
@ -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;

File diff suppressed because one or more lines are too long

View file

@ -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 {
@ -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;

File diff suppressed because one or more lines are too long

View file

@ -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 {
@ -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;

View file

@ -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 () {
@ -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;

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "vanilla-tilt",
"version": "1.8.0",
"version": "1.8.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "vanilla-tilt",
"version": "1.8.0",
"version": "1.8.1",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.26.0",

View file

@ -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",

View file

@ -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 {
@ -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;

2
vanilla-tilt.d.ts vendored
View file

@ -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