Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM2-32
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
YM2-32
Commits
bada2856
Commit
bada2856
authored
Jul 03, 2020
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 整体音频与题目音频没有分清
parent
a4b75e80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
form.component.html
src/app/form/form.component.html
+1
-1
MyGame.ts
src/app/play/game/MyGame.ts
+3
-3
No files found.
src/app/form/form.component.html
View file @
bada2856
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<br>
<br>
<span
style=
"float: left; height: 30px; font-size: 18px;"
>
题目音频:
</span>
<span
style=
"float: left; height: 30px; font-size: 18px;"
>
题目音频:
</span>
<app-audio-recorder
<app-audio-recorder
[
audioUrl
]="
item
.
a
udio
"
[
audioUrl
]="
item
.
tittleA
udio
"
(
audioUploaded
)="
onWholeQuestionAudioUploadSuccess
($
event
,
'
audio_url
')"
(
audioUploaded
)="
onWholeQuestionAudioUploadSuccess
($
event
,
'
audio_url
')"
></app-audio-recorder>
></app-audio-recorder>
<br>
<br>
...
...
src/app/play/game/MyGame.ts
View file @
bada2856
...
@@ -264,9 +264,9 @@ export class MyGame extends Game {
...
@@ -264,9 +264,9 @@ export class MyGame extends Game {
question
.
words
.
match
(
/
(([
a-z
]
|
[
A-Z
]
|
[
0-9
]
|'|-|&|_
)
+|.
)
/g
).
forEach
((
word
,
wordIdx
)
=>
{
question
.
words
.
match
(
/
(([
a-z
]
|
[
A-Z
]
|
[
0-9
]
|'|-|&|_
)
+|.
)
/g
).
forEach
((
word
,
wordIdx
)
=>
{
let
block
=
question
.
blocks
.
find
(
block
=>
block
.
idx
==
wordIdx
);
let
block
=
question
.
blocks
.
find
(
block
=>
block
.
idx
==
wordIdx
);
let
posX
=
labelList
.
reduce
((
offsetX
,
label
)
=>
offsetX
+
label
.
width
*
label
.
scaleX
,
0
);
let
posX
=
labelList
.
reduce
((
offsetX
,
label
)
=>
label
.
width
==
0
?
offsetX
:
offsetX
+
label
.
width
*
label
.
scaleX
,
0
);
console
.
log
(
'
posX =
'
+
posX
);
//
console.log('posX = ' + posX);
let
questionLabel
=
new
MyLabel
();
let
questionLabel
=
new
MyLabel
();
questionLabel
.
fontSize
=
42
;
questionLabel
.
fontSize
=
42
;
...
@@ -318,7 +318,7 @@ export class MyGame extends Game {
...
@@ -318,7 +318,7 @@ export class MyGame extends Game {
}
}
if
(
question
.
audio
!=
''
)
{
if
(
question
.
audio
!=
''
)
{
let
offsetX
=
labelList
.
reduce
((
offsetX
,
label
)
=>
{
return
offsetX
+
label
.
width
*
label
.
scaleX
}
,
0
);
let
offsetX
=
labelList
.
reduce
((
offsetX
,
label
)
=>
label
.
width
==
0
?
offsetX
:
offsetX
+
label
.
width
*
label
.
scaleX
,
0
);
this
.
_createSpeacker
(
this
.
_createSpeacker
(
this
.
images
.
get
(
'
Btn_s_play
'
),
this
.
images
.
get
(
'
Btn_s_play
'
),
this
.
images
.
get
(
'
Btn_s_pause
'
),
this
.
images
.
get
(
'
Btn_s_pause
'
),
...
...
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