Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM_4-2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
JM_4-2
Commits
65545a54
Commit
65545a54
authored
Aug 03, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 走查bug
parent
24caef41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
8 deletions
+45
-8
play.component.html
src/app/play/play.component.html
+7
-7
play.component.ts
src/app/play/play.component.ts
+38
-1
No files found.
src/app/play/play.component.html
View file @
65545a54
...
...
@@ -39,7 +39,7 @@
</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; "
>
<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>
...
...
@@ -56,25 +56,25 @@
</label>
</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;"
/>
</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;"
>
<label
style=
"margin-left: -0.5vw; font-family: Aileron-Black; font-size: 3.8vh; color:#ffffff"
>
{{'Submit'}}
</label>
</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
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>
...
...
@@ -101,7 +101,7 @@
</div>
<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; "
>
<label>
{{rs.resultTextArr[0]}}
</label>
...
...
src/app/play/play.component.ts
View file @
65545a54
...
...
@@ -182,7 +182,6 @@ export class PlayComponent implements OnInit, OnDestroy {
// this.initImg();
// this.initListener();
this
.
initData
();
this
.
stopSoundAnim
();
// this.playSentenceAudio();
...
...
@@ -301,6 +300,9 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
tweenItem
=
{}
this
.
tweenItem
.
circleHeight
=
this
.
circleHeightBase
;
this
.
tweenItem
.
submitOffY
=
0
// 20 * this.mapScale;
this
.
tweenItem
.
shadowOffY
=
0
//20 * this.mapScale;
// this.canTouch = true;
...
...
@@ -688,10 +690,45 @@ export class PlayComponent implements OnInit, OnDestroy {
submitAnswer
()
{
console
.
log
(
'
in submitAnswer:
'
,
this
.
curInputValue
)
if
(
!
this
.
canTouch
)
{
return
;
}
this
.
answerArr
.
push
(
this
.
curInputValue
);
this
.
curInputValue
=
''
;
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
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment