|
@@ -52,6 +52,7 @@ export default {
|
|
|
},
|
|
|
requestAnimationId: null,
|
|
|
treeImageNode: null,
|
|
|
+ timeoutId: null,
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -61,6 +62,7 @@ export default {
|
|
|
},
|
|
|
destroyed() {
|
|
|
cancelAnimationFrame(this.requestAnimationId)
|
|
|
+ clearTimeout(this.timeoutId)
|
|
|
},
|
|
|
methods: {
|
|
|
animate() {
|
|
@@ -73,7 +75,7 @@ export default {
|
|
|
onTreeImgLoad() {
|
|
|
this.showTree = true
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
+ this.timeoutId = setTimeout(() => {
|
|
|
this.treeImageNode = document.getElementById('tree-image')
|
|
|
const tween = new TWEEN.Tween(this.animationBottom)
|
|
|
tween.to({
|