mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 09:03:08 +02:00
Fix bug
This commit is contained in:
parent
af0a0ef41b
commit
2e680c3d1e
1 changed files with 8 additions and 1 deletions
|
@ -49,7 +49,8 @@ export default Vue.extend({
|
||||||
polylinePoints: '',
|
polylinePoints: '',
|
||||||
polygonPoints: '',
|
polygonPoints: '',
|
||||||
headX: null,
|
headX: null,
|
||||||
headY: null
|
headY: null,
|
||||||
|
clock: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -59,6 +60,12 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.draw();
|
this.draw();
|
||||||
|
|
||||||
|
// Vueが何故かWatchを発動させない場合があるので
|
||||||
|
this.clock = setInterval(this.draw, 1000);
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
clearInterval(this.clock);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
draw() {
|
draw() {
|
||||||
|
|
Loading…
Reference in a new issue