Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
ym_013
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
ym_013
Commits
74603626
Commit
74603626
authored
Feb 08, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
parent
4a57f417
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
play.component.ts
src/app/play/play.component.ts
+27
-4
No files found.
src/app/play/play.component.ts
View file @
74603626
...
...
@@ -558,12 +558,24 @@ export class PlayComponent implements OnInit, OnDestroy {
}
getDefaultWordArr
()
{
let
arr
=
[];
let
arr
=
[{
word_val
:
"
example
"
,
word_audio_url
:
""
,
word_font_size
:
110
,
letters
:[{
letter_val
:
"
example
"
,
letter_audio_url
:
""
,
letter_color
:
"
C04
"
}]
}];
return
arr
;
}
getDefaultTitleArr
()
{
let
arr
=
[];
let
arr
=
[{
title_val
:
"
ple
"
,
title_audio_url
:
""
}];
return
arr
;
}
...
...
@@ -686,8 +698,13 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
lesson_bg
=
lesson_bg
;
//课程信息
let
lessonText
=
"
Lesson
"
;
if
(
this
.
data
.
lesson_val
){
lessonText
+=
this
.
data
.
lesson_val
;
}
const
lesson
=
new
Label
();
lesson
.
text
=
"
Lesson
"
+
this
.
data
.
lesson_val
;
lesson
.
text
=
lessonText
;
lesson
.
textAlign
=
'
center
'
;
lesson
.
fontSize
=
40
;
lesson
.
fontName
=
'
BRLNSDB
'
;
...
...
@@ -975,7 +992,7 @@ export class PlayComponent implements OnInit, OnDestroy {
// 每行显示n个单词
else
if
(
index
%
cols
==
0
){
//每一行最后一个单词,高度起始坐标增加
startY
+=
this
.
interval_height
;
startY
+=
word_spreat
.
height
+
this
.
interval_height
;
//下一行X坐标复原
row_startX
=
startX
;
...
...
@@ -1038,8 +1055,14 @@ export class PlayComponent implements OnInit, OnDestroy {
}
}
let
title_bg_width
=
this
.
title_bg
.
width
;
//如果为空,则设置默认宽度
if
(
this
.
data
.
titleArr
.
length
==
0
){
title_bg_width
=
218
;
}
if
(
totalWidth
>=
this
.
title_bg
.
width
){
title_bg_width
=
totalWidth
+
100
;
...
...
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