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",
|
"name": "wavelovers",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "wavelovers",
|
"name": "wavelovers",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"license": "GNU GPL v3",
|
"license": "GNU GPL v3",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "wavelovers",
|
"name": "wavelovers",
|
||||||
"description": "Wavelovers. Use your device vibration correctly. Make a massager out of a gamepad.",
|
"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" ],
|
"keywords": [ "wavelovers", "gamepad-vibrator", "gamepad-test-tool", "gamepad-vibration-test-tool" ],
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"license": "GNU GPL v3",
|
"license": "GNU GPL v3",
|
||||||
"homepage": "https://wavelovers.ru/",
|
"homepage": "https://wavelovers.ru/",
|
||||||
"author": {
|
"author": {
|
||||||
@ -15,7 +15,7 @@
|
|||||||
"url": "https://github.com/eugene-serb/wavelovers/"
|
"url": "https://github.com/eugene-serb/wavelovers/"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/eugene-serb/wavelovers/issues"
|
"url": "https://github.com/eugene-serb/wavelovers/issues/"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
18
src/App.vue
18
src/App.vue
@ -21,13 +21,19 @@
|
|||||||
FooterItem: FooterItem,
|
FooterItem: FooterItem,
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addEventListeners(): void {
|
addGamepad: function (event: GamepadEvent): void {
|
||||||
window.addEventListener('gamepadconnected', (event: GamepadEvent) => store.dispatch('addGamepad', event));
|
store.dispatch('addGamepad', event);
|
||||||
window.addEventListener('gamepaddisconnected', (event: GamepadEvent) => store.dispatch('deleteGamepad', event));
|
|
||||||
},
|
},
|
||||||
removeEventListeners(): void {
|
deleteGamepad: function (event: GamepadEvent): void {
|
||||||
window.removeEventListener('gamepadconnected', (event: GamepadEvent) => store.dispatch('addGamepad', event));
|
store.dispatch('deleteGamepad', event);
|
||||||
window.removeEventListener('gamepaddisconnected', (event: GamepadEvent) => 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() {
|
mounted() {
|
||||||
|
Loading…
Reference in New Issue
Block a user