Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM5-16
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
YM5-16
Commits
3d988248
Commit
3d988248
authored
Apr 06, 2021
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整音频播放问题,及增加拖拽正确范围
parent
cdeb96a4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
play.component.ts
src/app/play/play.component.ts
+20
-3
No files found.
src/app/play/play.component.ts
View file @
3d988248
...
...
@@ -1005,7 +1005,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
canTouch
=
false
;
let
toX
=
(
this
.
canvasWidth
-
this
.
bigCard
.
bg
.
width
)
/
2
;
let
toY
=
(
this
.
canvasHeight
-
this
.
bigCard
.
bg
.
height
)
/
2
;
let
toY
=
(
this
.
canvasHeight
-
this
.
bigCard
.
bg
.
height
)
/
2
+
28
*
this
.
mapScale
;
this
.
playAudio
(
'
open
'
);
this
.
bigCard
.
showCard
(
toX
,
toY
,
()
=>
{
...
...
@@ -1030,6 +1030,15 @@ export class PlayComponent implements OnInit, OnDestroy {
return
;
}
if
(
this
.
checkClickTarget
(
this
.
bigCard
.
contentSpr
)){
if
(
this
.
curExercises
){
this
.
playAudio
(
this
.
curExercises
.
audioUrl
);
}
return
;
}
}
isMove
(
item
)
{
...
...
@@ -1108,8 +1117,9 @@ export class PlayComponent implements OnInit, OnDestroy {
for
(
let
i
=
0
;
i
<
this
.
lineSprArr
.
length
;
++
i
)
{
let
tLineSpr
=
this
.
lineSprArr
[
i
];
if
(
this
.
checkPointInRect
(
this
.
mx
,
this
.
my
,
tLineSpr
.
bg
.
getBoundingBox
()))
{
let
rect
=
tLineSpr
.
bg
.
getBoundingBox
();
rect
.
height
+=
30
*
this
.
mapScale
;
if
(
this
.
checkPointInRect
(
this
.
mx
,
this
.
my
,
rect
))
{
lineIndex
=
i
;
lineSpr
=
tLineSpr
;
break
;
...
...
@@ -1122,6 +1132,13 @@ export class PlayComponent implements OnInit, OnDestroy {
return
;
}
let
answerSpr
=
this
.
answerSprArr
[
lineIndex
];
if
(
answerSpr
!=
letterItem
){
back
();
return
;
}
letterItem
.
lineIndex
=
lineIndex
;
this
.
playAudio
(
'
right
'
,
true
);
...
...
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