Commit 65545a54 authored by limingzhe's avatar limingzhe

fix: 走查bug

parent 24caef41
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</div> </div>
</div> </div>
<!-- 页码 --> <!-- 页码 -->
<div style="position: absolute; top: 0; margin-top: 19.7vh; right: -0.7%;"> <div style="z-index: 1; position: absolute; top: 0; margin-top: 19.7vh; right: -0.7%;">
<img src="assets/play/page_num_bg.png" style="height: 7.1vh; width: auto; "> <img src="assets/play/page_num_bg.png" style="height: 7.1vh; width: auto; ">
<div style="position: relative; height: 8.1vh; top: -8.1vh; display: flex; align-items: center; justify-content: center;"> <div style="position: relative; height: 8.1vh; top: -8.1vh; display: flex; align-items: center; justify-content: center;">
<label style="margin-left: -0.5vw; font-family: DroidSansFallback; font-size: 3.8vh; color:#ffffff">{{curPage + ' / ' + totalPage}}</label> <label style="margin-left: -0.5vw; font-family: DroidSansFallback; font-size: 3.8vh; color:#ffffff">{{curPage + ' / ' + totalPage}}</label>
...@@ -56,25 +56,25 @@ ...@@ -56,25 +56,25 @@
</label> </label>
</div> </div>
<!-- 面板阴影 --> <!-- 面板阴影 -->
<div style="width: 100%; position: absolute; top:0; margin-top: 20.8vh; text-align: center;"> <div style="z-index: 0; width: 100%; position: absolute; top:0; margin-top: 20.8vh; text-align: center;">
<img src="assets/play/sentence_bg_shadow.png" style="width: auto; height: 12.9vh;"/> <img src="assets/play/sentence_bg_shadow.png" style="width: auto; height: 12.9vh;"/>
</div> </div>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<div style="position: absolute; width: 100%; top: 0; margin-top: 40%; z-index: 1;"> <div style="position: absolute; width: 100%; top: 0; margin-top: 40%; z-index: 1;" >
<img src="assets/play/btn.png" style="height: 9.5vh; width: auto; " > <img src="assets/play/btn.png" style="height: 9.5vh; width: auto;" [style.marginTop]="tweenItem?.submitOffY + 'vh'" >
<div style="position: relative; height: 9.5vh; top: -9.5vh; display: flex; align-items: center; justify-content: center;"> <div style="position: relative; height: 9.5vh; top: -9.5vh; display: flex; align-items: center; justify-content: center;">
<label style="margin-left: -0.5vw; font-family: Aileron-Black; font-size: 3.8vh; color:#ffffff">{{'Submit'}}</label> <label style="margin-left: -0.5vw; font-family: Aileron-Black; font-size: 3.8vh; color:#ffffff">{{'Submit'}}</label>
</div> </div>
<!-- 点击区域 --> <!-- 点击区域 -->
<div (click)="submitAnswer()" style="position: relative; margin-top: -19vh; margin-left: auto; margin-right: auto; height: 9.5vh; width: 52.6vh; "> <div (mousedown)="submitAnswer()" (touchstart)="submitAnswer()" style=" position: relative; margin-top: -19vh; margin-left: auto; margin-right: auto; height: 9.5vh; width: 52.6vh; ">
</div> </div>
</div> </div>
<div style="width: 100%; position: absolute; top:0; margin-top: 49.5vh; text-align: center;"> <div style="width: 100%; position: absolute; top:0; margin-top: 49.5vh; text-align: center;">
<img src="assets/play/btn_shadow.png" style="width: auto; height: 12.9vh;"/> <img src="assets/play/btn_shadow.png" style="width: auto; height: 12.9vh;" [style.marginTop]="tweenItem?.shadowOffY + 'vh'" />
</div> </div>
</div> </div>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
</div> </div>
<div style="width: 100%; position: absolute; margin-top: -60vh; display: flex; align-items: center; justify-content: center;"> <div style="width: 100%; position: absolute; margin-top: -60vh; display: flex; align-items: center; justify-content: center;">
<div style=" width: 120.3vh; height: 54.4vh; display: flex; align-items: center; flex-direction: column; overflow-y: scroll; "> <div style=" width: 120.3vh; height: 54.4vh; display: flex; align-items: center; flex-direction: column; overflow-y: auto; ">
<!-- 句子 --> <!-- 句子 -->
<div *ngFor="let rs of resultSentenceArr; let i = index" style="width: 90%; font-family: DroidSansFallback; font-size: 2.8vh; color:#ffffff; text-align: left; margin-top: 2vh; "> <div *ngFor="let rs of resultSentenceArr; let i = index" style="width: 90%; font-family: DroidSansFallback; font-size: 2.8vh; color:#ffffff; text-align: left; margin-top: 2vh; ">
<label>{{rs.resultTextArr[0]}}</label> <label>{{rs.resultTextArr[0]}}</label>
......
...@@ -182,7 +182,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -182,7 +182,6 @@ export class PlayComponent implements OnInit, OnDestroy {
// this.initImg(); // this.initImg();
// this.initListener(); // this.initListener();
this.initData(); this.initData();
this.stopSoundAnim(); this.stopSoundAnim();
// this.playSentenceAudio(); // this.playSentenceAudio();
...@@ -301,6 +300,9 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -301,6 +300,9 @@ export class PlayComponent implements OnInit, OnDestroy {
this.tweenItem = {} this.tweenItem = {}
this.tweenItem.circleHeight = this.circleHeightBase; this.tweenItem.circleHeight = this.circleHeightBase;
this.tweenItem.submitOffY = 0 // 20 * this.mapScale;
this.tweenItem.shadowOffY = 0 //20 * this.mapScale;
// this.canTouch = true; // this.canTouch = true;
...@@ -688,10 +690,45 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -688,10 +690,45 @@ export class PlayComponent implements OnInit, OnDestroy {
submitAnswer() { submitAnswer() {
console.log(' in submitAnswer: ', this.curInputValue) console.log(' in submitAnswer: ', this.curInputValue)
if (!this.canTouch) {
return;
}
this.answerArr.push(this.curInputValue); this.answerArr.push(this.curInputValue);
this.curInputValue = ''; this.curInputValue = '';
this.changeNextQuestion(); this.changeNextQuestion();
const time = 0.2;
tweenChange(this.tweenItem, {submitOffY: 1}, time / 2, ()=> {
this.canTouch = false;
tweenChange(this.tweenItem, {submitOffY: 0 * this.mapScale}, time / 2, ()=> {
this.canTouch = true;
})
})
tweenChange(this.tweenItem, {shadowOffY: -1 * this.mapScale}, time / 2, () => {
tweenChange(this.tweenItem, {shadowOffY: 0 * this.mapScale}, time / 2, () => {
})
})
} }
changeNextQuestion() { changeNextQuestion() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment