|
@@ -136,6 +136,17 @@
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <button
|
|
|
|
+ v-if="[0, 1, 2].includes(tourState)"
|
|
|
|
+ class="btn-stop-treasure-display"
|
|
|
|
+ @click="onClickStopTreasureDisplay"
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ src="@/assets/button-stop.png"
|
|
|
|
+ alt=""
|
|
|
|
+ >
|
|
|
|
+ </button>
|
|
|
|
+
|
|
<div
|
|
<div
|
|
v-show="[1].includes(tourState)"
|
|
v-show="[1].includes(tourState)"
|
|
class="treasure-frames-wrap"
|
|
class="treasure-frames-wrap"
|
|
@@ -354,6 +365,9 @@ export default {
|
|
},
|
|
},
|
|
unmounted() {
|
|
unmounted() {
|
|
cancelAnimationFrame(this.animationFrameId)
|
|
cancelAnimationFrame(this.animationFrameId)
|
|
|
|
+ this.treasureFadeInTween.stop()
|
|
|
|
+ this.treasureFadeOutTween.stop()
|
|
|
|
+ clearInterval(this.treasureFrameIntervalId)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
onMouseDown(e) {
|
|
onMouseDown(e) {
|
|
@@ -451,6 +465,16 @@ export default {
|
|
|
|
|
|
this.treasureFadeInTween.start()
|
|
this.treasureFadeInTween.start()
|
|
},
|
|
},
|
|
|
|
+ onClickStopTreasureDisplay() {
|
|
|
|
+ this.tourState = 3
|
|
|
|
+ this.treasureFadeInTween.stop()
|
|
|
|
+ this.treasureFadeOutTween.stop()
|
|
|
|
+ clearInterval(this.treasureFrameIntervalId)
|
|
|
|
+ this.treasureFrameCurNum = 0
|
|
|
|
+ this.$refs.treasure.style.left = this.treasureFadeInInitialLeft + 'px'
|
|
|
|
+ this.$refs.treasure.style.top = this.treasureFadeInInitialTop + 'px'
|
|
|
|
+ this.$refs.treasure.style.transform = `translate(-50%, -50%) scale(1)`
|
|
|
|
+ },
|
|
onTreasureFrameLoad(idx) {
|
|
onTreasureFrameLoad(idx) {
|
|
this.treasureFrameStateList[idx] = true
|
|
this.treasureFrameStateList[idx] = true
|
|
},
|
|
},
|
|
@@ -565,6 +589,13 @@ export default {
|
|
object-fit: cover;
|
|
object-fit: cover;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .btn-stop-treasure-display {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 20px;
|
|
|
|
+ right: 20px;
|
|
|
|
+ z-index: 4;
|
|
|
|
+ border: none;
|
|
|
|
+ }
|
|
.treasure-frames-wrap {
|
|
.treasure-frames-wrap {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 0;
|
|
top: 0;
|