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
4f8a1b81
Commit
4f8a1b81
authored
Apr 07, 2021
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复问题
parent
3d988248
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
play.component.ts
src/app/play/play.component.ts
+8
-6
No files found.
src/app/play/play.component.ts
View file @
4f8a1b81
...
@@ -940,6 +940,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -940,6 +940,7 @@ export class PlayComponent implements OnInit, OnDestroy {
return
;
return
;
}
}
this
.
curDragItem
.
bg
.
strokeColor
=
this
.
curDragItem
.
lineColor
;
if
(
!
this
.
isMove
(
this
.
curDragItem
))
{
if
(
!
this
.
isMove
(
this
.
curDragItem
))
{
return
;
return
;
}
}
...
@@ -970,7 +971,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -970,7 +971,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
!
this
.
curDragItem
)
{
if
(
!
this
.
curDragItem
)
{
return
;
return
;
}
}
this
.
curDragItem
.
bg
.
strokeColor
=
this
.
curDragItem
.
lineColor
;
if
(
!
this
.
isMove
(
this
.
curDragItem
))
{
if
(
!
this
.
isMove
(
this
.
curDragItem
))
{
this
.
curAudio
=
this
.
playAudio
(
this
.
curDragItem
.
data
.
audioUrl
,
true
);
this
.
curAudio
=
this
.
playAudio
(
this
.
curDragItem
.
data
.
audioUrl
,
true
);
...
@@ -1033,7 +1034,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1033,7 +1034,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
this
.
checkClickTarget
(
this
.
bigCard
.
contentSpr
)){
if
(
this
.
checkClickTarget
(
this
.
bigCard
.
contentSpr
)){
if
(
this
.
curExercises
){
if
(
this
.
curExercises
){
this
.
playAudio
(
this
.
curExercises
.
audioUrl
);
this
.
playAudio
(
this
.
curExercises
.
audioUrl
,
true
);
}
}
return
;
return
;
...
@@ -1075,7 +1076,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1075,7 +1076,7 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
index
!=
-
1
)
{
if
(
index
!=
-
1
)
{
this
.
renderArr
.
splice
(
index
,
1
);
this
.
renderArr
.
splice
(
index
,
1
);
}
}
item
.
bg
.
strokeColor
=
"
#f26321
"
;
this
.
renderArr
.
push
(
item
.
bg
);
this
.
renderArr
.
push
(
item
.
bg
);
}
}
...
@@ -1134,7 +1135,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1134,7 +1135,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let
answerSpr
=
this
.
answerSprArr
[
lineIndex
];
let
answerSpr
=
this
.
answerSprArr
[
lineIndex
];
if
(
answerSpr
!=
letterItem
){
if
(
answerSpr
.
data
.
val
!=
letterItem
.
data
.
val
){
back
();
back
();
return
;
return
;
}
}
...
@@ -1250,7 +1251,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1250,7 +1251,7 @@ export class PlayComponent implements OnInit, OnDestroy {
const
pic
=
new
MySprite
();
const
pic
=
new
MySprite
();
pic
.
init
(
this
.
images
.
get
(
this
.
curExercises
.
picUrl
));
pic
.
init
(
this
.
images
.
get
(
this
.
curExercises
.
picUrl
));
pic
.
x
=
this
.
canvasWidth
/
2
;
pic
.
x
=
this
.
canvasWidth
/
2
;
pic
.
y
=
this
.
canvasHeight
/
2
-
117
*
this
.
mapScale
;
pic
.
y
=
this
.
canvasHeight
/
2
-
81
*
this
.
mapScale
;
let
scale
=
Math
.
min
(
mW
/
pic
.
width
,
mH
/
pic
.
height
);
let
scale
=
Math
.
min
(
mW
/
pic
.
width
,
mH
/
pic
.
height
);
pic
.
setScaleXY
(
scale
);
pic
.
setScaleXY
(
scale
);
...
@@ -1263,6 +1264,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1263,6 +1264,7 @@ export class PlayComponent implements OnInit, OnDestroy {
richText
.
text
=
this
.
curExercises
.
val
;
richText
.
text
=
this
.
curExercises
.
val
;
richText
.
fontSize
=
60
;
richText
.
fontSize
=
60
;
richText
.
textAlign
=
'
left
'
;
richText
.
textAlign
=
'
left
'
;
richText
.
disH
=
10
;
richText
.
setScaleXY
(
this
.
mapScale
);
richText
.
setScaleXY
(
this
.
mapScale
);
richText
.
maxWidth
=
1120
;
richText
.
maxWidth
=
1120
;
richText
.
refreshSize
();
richText
.
refreshSize
();
...
@@ -1270,7 +1272,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1270,7 +1272,7 @@ export class PlayComponent implements OnInit, OnDestroy {
richText
.
y
=
this
.
canvasHeight
+
150
*
this
.
mapScale
;
richText
.
y
=
this
.
canvasHeight
+
150
*
this
.
mapScale
;
this
.
renderArr
.
push
(
richText
);
this
.
renderArr
.
push
(
richText
);
let
toY
=
this
.
canvasHeight
/
2
+
1
5
0
*
this
.
mapScale
;
let
toY
=
this
.
canvasHeight
/
2
+
1
8
0
*
this
.
mapScale
;
tweenChange
(
richText
,
{
y
:
toY
},
0.5
,
()
=>
{
tweenChange
(
richText
,
{
y
:
toY
},
0.5
,
()
=>
{
this
.
canTouch
=
true
;
this
.
canTouch
=
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