Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JM-15
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-15
Commits
3d403f93
Commit
3d403f93
authored
Oct 15, 2021
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 标题右移
parent
95aa92da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
play.component.ts
src/app/play/play.component.ts
+8
-4
No files found.
src/app/play/play.component.ts
View file @
3d403f93
...
@@ -277,7 +277,8 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -277,7 +277,8 @@ export class PlayComponent implements OnInit, OnDestroy {
initDefaultData
()
{
initDefaultData
()
{
const
data
=
{
"
sentenceArr
"
:[{
"
text
"
:
"
111 2 2222 3333 4444.! 444.! 444.! 444.! 222 3333 4444.! 444.! 444.! 44 _ .
"
,
"
answer
"
:
"
1111
"
,
"
answerType
"
:
"
occupation
"
,
"
isChangeLine
"
:
true
},{
"
text
"
:
"
555 666 _ 777 8888 99999!
"
,
"
answer
"
:
"
2222
"
,
"
answerType
"
:
"
date
"
,
"
isChangeLine
"
:
true
},{
"
text
"
:
"
111 _ 2222
"
,
"
answer
"
:
"
3
"
},{
"
text
"
:
"
444 _ 44444
"
,
"
answer
"
:
"
4
"
},{
"
text
"
:
"
555 _ 5555555
"
,
"
answer
"
:
"
5
"
},{
"
text
"
:
"
666 _ dsa dsa dsa
"
,
"
answer
"
:
"
a
"
},{
"
text
"
:
"
666 _ dsa dsa dsa
"
,
"
answer
"
:
"
b
"
},{
"
text
"
:
"
666 _ dsa dsa dsa
"
,
"
answer
"
:
"
c
"
}],
"
templateArr
"
:[],
"
title
"
:
"
aaa aaa
"
,
"
tipArr
"
:[[{
"
text
"
:
"
44
"
},{
"
text
"
:
"
1
"
}],[{
"
text
"
:
"
222
"
},{
"
text
"
:
"
555
"
,
"
isShowIcon
"
:
true
},{
"
text
"
:
"
666
"
,
"
isShowIcon
"
:
true
},{
"
text
"
:
"
777
"
,
"
isShowIcon
"
:
true
}]],
"
bgItem
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/b876b9b2748414253c662d32177b4178.png
"
,
"
rect
"
:{
"
x
"
:
67.42
,
"
y
"
:
0
,
"
width
"
:
929.16
,
"
height
"
:
410
}},
"
hotZoneItemArr
"
:[{
"
id
"
:
"
1632387004410
"
,
"
index
"
:
0
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
word
"
,
"
labelText
"
:
"
Hi
"
,
"
posX
"
:
390.5
,
"
posY
"
:
192
,
"
rect
"
:{
"
x
"
:
203.38
,
"
y
"
:
149.25
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}},{
"
id
"
:
"
1632387054795
"
,
"
index
"
:
1
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
time
"
,
"
posX
"
:
593.4958429447247
,
"
posY
"
:
"
192
"
,
"
rect
"
:{
"
x
"
:
385.9
,
"
y
"
:
149.25
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}},{
"
id
"
:
"
1632387061874
"
,
"
index
"
:
2
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
city
"
,
"
posX
"
:
801.4958429447247
,
"
posY
"
:
"
192
"
,
"
rect
"
:{
"
x
"
:
572.92
,
"
y
"
:
149.25
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}},{
"
id
"
:
"
1632387063064
"
,
"
index
"
:
3
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
work
"
,
"
posX
"
:
1004.4958429447247
,
"
posY
"
:
"
192
"
,
"
rect
"
:{
"
x
"
:
755.44
,
"
y
"
:
149.25
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}},{
"
id
"
:
"
1632387122910
"
,
"
index
"
:
4
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
name
"
,
"
posX
"
:
389.4958429447247
,
"
posY
"
:
265.99921052956194
,
"
rect
"
:{
"
x
"
:
202.48
,
"
y
"
:
215.79
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}},{
"
id
"
:
"
1632387127274
"
,
"
index
"
:
5
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
time
"
,
"
posX
"
:
594.4950082442094
,
"
posY
"
:
264.99921052956194
,
"
rect
"
:{
"
x
"
:
386.8
,
"
y
"
:
214.89
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}},{
"
id
"
:
"
1632387134147
"
,
"
index
"
:
6
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
city
"
,
"
posX
"
:
800.4941529845682
,
"
posY
"
:
265.99921052956194
,
"
rect
"
:{
"
x
"
:
572.01
,
"
y
"
:
215.79
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}},{
"
id
"
:
"
1632387139551
"
,
"
index
"
:
7
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.83125
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.83125
,
"
dragDot
"
:{
"
x
"
:
532
,
"
y
"
:
203.6876574307305
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
work
"
,
"
posX
"
:
1005.4933182840531
,
"
posY
"
:
266.99921052956194
,
"
rect
"
:{
"
x
"
:
756.33
,
"
y
"
:
216.69
,
"
width
"
:
153.75
,
"
height
"
:
46.75
}}],
"
bg_url
"
:
"
http://staging-teach.cdn.ireadabc.com/ea1a5b5a1de77baf71c49ccf3a2f690f.jpg
"
}
const
data
=
{
"
sentenceArr
"
:[],
"
templateArr
"
:[],
"
bg_url
"
:
"
http://staging-teach.cdn.ireadabc.com/1aaccbaa8f3a32df099f3308feac49e7.png
"
,
"
title
"
:
"
new word
"
,
"
bgItem
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/e3672206ffa9736c449b64d05f688b30.png
"
,
"
rect
"
:{
"
x
"
:
102.83
,
"
y
"
:
0
,
"
width
"
:
485.33
,
"
height
"
:
273
}},
"
hotZoneItemArr
"
:[{
"
id
"
:
"
1634265930328
"
,
"
index
"
:
0
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
JJ
"
,
"
posX
"
:
282.5
,
"
posY
"
:
52
,
"
rect
"
:{
"
x
"
:
13.35
,
"
y
"
:
22.52
,
"
width
"
:
136.5
,
"
height
"
:
25.94
}},{
"
id
"
:
"
1634265945079
"
,
"
index
"
:
1
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
RB
"
,
"
posX
"
:
552.5
,
"
posY
"
:
59
,
"
rect
"
:{
"
x
"
:
197.63
,
"
y
"
:
27.98
,
"
width
"
:
136.5
,
"
height
"
:
24.57
}},{
"
id
"
:
"
1634265955820
"
,
"
index
"
:
2
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
WP
"
,
"
posX
"
:
281.5
,
"
posY
"
:
129
,
"
rect
"
:{
"
x
"
:
12.67
,
"
y
"
:
73.71
,
"
width
"
:
136.5
,
"
height
"
:
28.67
}},{
"
id
"
:
"
1634265962408
"
,
"
index
"
:
3
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
CD
"
,
"
posX
"
:
548.5
,
"
posY
"
:
132
,
"
rect
"
:{
"
x
"
:
194.9
,
"
y
"
:
75.08
,
"
width
"
:
136.5
,
"
height
"
:
30.03
}},{
"
id
"
:
"
1634265967558
"
,
"
index
"
:
4
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
IN
"
,
"
posX
"
:
284.5
,
"
posY
"
:
213
,
"
rect
"
:{
"
x
"
:
14.72
,
"
y
"
:
131.72
,
"
width
"
:
136.5
,
"
height
"
:
27.3
}},{
"
id
"
:
"
1634266027751
"
,
"
index
"
:
5
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
VB
"
,
"
posX
"
:
292.5
,
"
posY
"
:
320
,
"
rect
"
:{
"
x
"
:
20.18
,
"
y
"
:
202.7
,
"
width
"
:
136.5
,
"
height
"
:
31.4
}},{
"
id
"
:
"
1634266044165
"
,
"
index
"
:
6
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
NN
"
,
"
posX
"
:
544.5
,
"
posY
"
:
308
,
"
rect
"
:{
"
x
"
:
192.17
,
"
y
"
:
194.51
,
"
width
"
:
136.5
,
"
height
"
:
31.4
}},{
"
id
"
:
"
1634266050496
"
,
"
index
"
:
7
,
"
itemType
"
:
"
rect
"
,
"
fontScale
"
:
0.53984375
,
"
imgScale
"
:
1
,
"
imgSizeW
"
:
0
,
"
imgSizeH
"
:
0
,
"
mapScale
"
:
0.53984375
,
"
dragDot
"
:{
"
x
"
:
345.5
,
"
y
"
:
133.26904532304724
},
"
gIdx
"
:
"
0
"
,
"
selectType
"
:
"
NN
"
,
"
posX
"
:
759.5
,
"
posY
"
:
323
,
"
rect
"
:{
"
x
"
:
338.91
,
"
y
"
:
204.75
,
"
width
"
:
136.5
,
"
height
"
:
31.4
}}]}
this
.
data
=
{
contentObj
:
data
};
this
.
data
=
{
contentObj
:
data
};
...
@@ -1776,7 +1777,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -1776,7 +1777,7 @@ export class PlayComponent implements OnInit, OnDestroy {
title
.
fontName
=
'
Aileron-Bold
'
;
title
.
fontName
=
'
Aileron-Bold
'
;
title
.
textAlign
=
'
left
'
;
title
.
textAlign
=
'
left
'
;
// title.setMaxSize(this.canvasWidth * 0.9);
// title.setMaxSize(this.canvasWidth * 0.9);
title
.
x
=
this
.
canvasWidth
/
1
0
;
title
.
x
=
24
0
;
title
.
y
=
100
*
this
.
mapScale
;
title
.
y
=
100
*
this
.
mapScale
;
title
.
fontColor
=
'
#3e9b31
'
;
title
.
fontColor
=
'
#3e9b31
'
;
title
.
text
=
this
.
data
.
contentObj
.
title
||
""
;
title
.
text
=
this
.
data
.
contentObj
.
title
||
""
;
...
@@ -2400,7 +2401,7 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2400,7 +2401,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// result = checkAnswer(data.selectType, answer, this.hotZoneArr[i].labelText || null);
// result = checkAnswer(data.selectType, answer, this.hotZoneArr[i].
data.
labelText || null);
}
}
...
@@ -2428,9 +2429,12 @@ export class PlayComponent implements OnInit, OnDestroy {
...
@@ -2428,9 +2429,12 @@ export class PlayComponent implements OnInit, OnDestroy {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
'
in greadPapersForCheck data:
'
,
{
type
:
data
.
selectType
,
blankWord
:
answer
,
word
:
labelText
});
window
[
'
courseware
'
].
greadPapersForCheck
({
type
:
data
.
selectType
,
blankWord
:
answer
,
word
:
labelText
},
res
=>
{
window
[
'
courseware
'
].
greadPapersForCheck
({
type
:
data
.
selectType
,
blankWord
:
answer
,
word
:
labelText
},
res
=>
{
// res 需要toJSON
// res 需要toJSON
console
.
log
(
'
res:
'
,
res
);
console
.
log
(
'
in greadPapersForCheck
res:
'
,
res
);
if
(
res
)
{
if
(
res
)
{
resolve
(
JSON
.
parse
(
res
))
resolve
(
JSON
.
parse
(
res
))
...
...
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