mirror of
https://github.com/eugene-serb/wavelovers.git
synced 2023-09-09 23:41:16 +03:00
- fixed adding and removing event listeners.
- updated version. - updated packages. - rebuild.
This commit is contained in:
parent
b31e987c72
commit
a66df1331a
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "wavelovers",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "wavelovers",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"license": "GNU GPL v3",
|
||||
"dependencies": {
|
||||
"core-js": "^3.8.3",
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "wavelovers",
|
||||
"description": "Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad.",
|
||||
"keywords": [ "wavelovers", "gamepad-vibrator", "gamepad-test-tool", "gamepad-vibration-test-tool" ],
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"license": "GNU GPL v3",
|
||||
"homepage": "https://wavelovers.ru/",
|
||||
"author": {
|
||||
@ -15,7 +15,7 @@
|
||||
"url": "https://github.com/eugene-serb/wavelovers/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/eugene-serb/wavelovers/issues"
|
||||
"url": "https://github.com/eugene-serb/wavelovers/issues/"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
18
src/App.vue
18
src/App.vue
@ -21,13 +21,19 @@
|
||||
FooterItem: FooterItem,
|
||||
},
|
||||
methods: {
|
||||
addEventListeners(): void {
|
||||
window.addEventListener('gamepadconnected', (event: GamepadEvent) => store.dispatch('addGamepad', event));
|
||||
window.addEventListener('gamepaddisconnected', (event: GamepadEvent) => store.dispatch('deleteGamepad', event));
|
||||
addGamepad: function (event: GamepadEvent): void {
|
||||
store.dispatch('addGamepad', event);
|
||||
},
|
||||
removeEventListeners(): void {
|
||||
window.removeEventListener('gamepadconnected', (event: GamepadEvent) => store.dispatch('addGamepad', event));
|
||||
window.removeEventListener('gamepaddisconnected', (event: GamepadEvent) => store.dispatch('deleteGamepad', event));
|
||||
deleteGamepad: function (event: GamepadEvent): void {
|
||||
store.dispatch('deleteGamepad', event);
|
||||
},
|
||||
addEventListeners: function (): void {
|
||||
window.addEventListener('gamepadconnected', this.addGamepad);
|
||||
window.addEventListener('gamepaddisconnected', this.deleteGamepad);
|
||||
},
|
||||
removeEventListeners: function (): void {
|
||||
window.removeEventListener('gamepadconnected', this.addGamepad);
|
||||
window.removeEventListener('gamepaddisconnected', this.deleteGamepad);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
Loading…
Reference in New Issue
Block a user