Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
ym009
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
ym009
Commits
f89f926b
Commit
f89f926b
authored
Feb 22, 2020
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
圈里的字体缩放
parent
689d13b1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
104 deletions
+108
-104
form.component.html
src/app/form/form.component.html
+102
-102
play.component.ts
src/app/play/play.component.ts
+6
-2
No files found.
src/app/form/form.component.html
View file @
f89f926b
<div
class=
"model-content"
>
<div
nz-row
>
<div
nz-col
nzOffset=
'4'
><h1
nz-title
>
课程内容编辑
</h1></div>
<div
nz-col
nzOffset=
'4'
>
<h1
nz-title
>
课程内容编辑
</h1>
</div>
</div>
<div
nz-form
>
<div
id=
'title-anchor'
>
...
...
@@ -22,8 +24,7 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_audio_url"
>
发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
[
audioUrl
]="
item
.
title
.
t_audio_url
"
id=
"t_audio_url"
<app-audio-recorder
[
audioUrl
]="
item
.
title
.
t_audio_url
"
id=
"t_audio_url"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
.
title
,
'
t_audio_url
')"
>
</app-audio-recorder>
</nz-form-control>
...
...
@@ -31,13 +32,15 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font_size"
>
字体大小
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<nz-input-number
[(
ngModel
)]="
item
.
title
.
t_font_size
"
[
nzMin
]="
1
"
[
nzStep
]="
1
"
(
blur
)="
save
()"
></nz-input-number>
<nz-input-number
[(
ngModel
)]="
item
.
title
.
t_font_size
"
[
nzMin
]="
1
"
[
nzStep
]="
1
"
(
blur
)="
save
()"
>
</nz-input-number>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font"
>
字体
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the font"
(
ngModelChange
)="
save
()"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the font"
(
ngModelChange
)="
save
()"
>
<nz-option
nzValue=
"BRLNSB"
nzLabel=
"BRLNSB"
></nz-option>
<nz-option
nzValue=
"BRLNSDB"
nzLabel=
"BRLNSDB"
></nz-option>
<nz-option
nzValue=
"BRLNSR"
nzLabel=
"BRLNSR"
></nz-option>
...
...
@@ -55,7 +58,8 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"t_font_color"
>
颜色
</nz-form-label>
<nz-form-control
[
nzSpan
]="
4
"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font_color
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the color"
(
ngModelChange
)="
save
()"
>
<nz-select
[(
ngModel
)]="
item
.
title
.
t_font_color
"
[
nzShowSearch
]='
true
'
nzAllowClear
nzPlaceHolder=
"Please select the color"
(
ngModelChange
)="
save
()"
>
<nz-option
nzValue=
"#008000"
nzLabel=
"绿色"
></nz-option>
<nz-option
nzValue=
"#FF0000"
nzLabel=
"红色"
></nz-option>
<nz-option
nzValue=
"#D2691E"
nzLabel=
"巧克力色"
></nz-option>
...
...
@@ -68,8 +72,7 @@
<nz-divider
nzText=
"听力材料"
nzOrientation=
"left"
></nz-divider>
<nz-form-item>
<nz-form-control
[
nzSpan
]="
6
"
nzOffset=
"3"
>
<app-audio-recorder
id=
"item.listen_audio_url"
[
audioUrl
]="
item
.
listen_audio_url
"
<app-audio-recorder
id=
"item.listen_audio_url"
[
audioUrl
]="
item
.
listen_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
listen_audio_url
')"
>
</app-audio-recorder>
</nz-form-control>
...
...
@@ -86,8 +89,7 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words_audio_url"
>
字母组合一发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
[
audioUrl
]="
item
.
words_audio_url
"
id=
"words_audio_url"
<app-audio-recorder
[
audioUrl
]="
item
.
words_audio_url
"
id=
"words_audio_url"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
words_audio_url
')"
>
</app-audio-recorder>
</nz-form-control>
...
...
@@ -102,8 +104,7 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
3
"
nzFor=
"words_two_audio_url"
>
字母组合二发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
[
audioUrl
]="
item
.
words_two_audio_url
"
id=
"words_two_audio_url"
<app-audio-recorder
[
audioUrl
]="
item
.
words_two_audio_url
"
id=
"words_two_audio_url"
(
audioUploaded
)="
onAudioUploadSuccess
($
event
,
item
,
'
words_two_audio_url
')"
>
</app-audio-recorder>
</nz-form-control>
...
...
@@ -121,14 +122,14 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.left.word_val"
>
单词
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
left
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
left
')"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
left
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
left
')"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.left.word_audio_url"
>
发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
id=
"it.left.word_audio_url"
[
audioUrl
]="
it
.
left
.
word_audio_url
"
<app-audio-recorder
id=
"it.left.word_audio_url"
[
audioUrl
]="
it
.
left
.
word_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
it
.
left
,'
word_audio_url
')"
>
</app-audio-recorder>
</nz-form-control>
...
...
@@ -171,14 +172,14 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.right.word_val"
>
单词
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
right
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
right
')"
>
<input
type=
"text"
nz-input
placeholder=
"请录入单词"
[(
ngModel
)]="
it
.
right
.
word_val
"
(
blur
)="
saveWordItem
(
i
,'
right
')"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"it.right.word_audio_url"
>
发音
</nz-form-label>
<nz-form-control
[
nzSpan
]="
6
"
>
<app-audio-recorder
id=
"it.right.word_audio_url"
[
audioUrl
]="
it
.
right
.
word_audio_url
"
<app-audio-recorder
id=
"it.right.word_audio_url"
[
audioUrl
]="
it
.
right
.
word_audio_url
"
(
audioUploaded
)="
onAudioUploadSuccessByItem
($
event
,
it
.
right
,'
word_audio_url
')"
>
</app-audio-recorder>
</nz-form-control>
...
...
@@ -223,8 +224,7 @@
</nz-form-item>
<nz-form-item>
<nz-form-control
[
nzSpan
]="
3
"
nzOffset=
"3"
class=
"add-btn-box"
>
<button
nz-button
nzType=
"dashed"
class=
"add-btn"
id=
"add-btn"
(
click
)="
addItem
()"
>
<button
nz-button
nzType=
"dashed"
class=
"add-btn"
id=
"add-btn"
(
click
)="
addItem
()"
>
<i
nz-icon
nzType=
"plus-circle"
nzTheme=
"outline"
></i>
添加
</button>
</nz-form-control>
...
...
src/app/play/play.component.ts
View file @
f89f926b
...
...
@@ -995,7 +995,9 @@ export class PlayComponent implements OnInit, OnDestroy {
words_content
.
fontColor
=
'
#ab5a23
'
;
words_content
.
refreshSize
();
words_bg
.
addChild
(
words_content
);
words_bg
.
setScaleXY
(
this
.
mapScale
);
words_bg
.
setRadius
(
words_content
.
width
/
3
*
2
);
let
scale
=
getMinScale
(
words_bg
,
80
)
*
this
.
mapScale
words_bg
.
setScaleXY
(
scale
);
const
words_bg_right
=
new
ShapeCircle
();
words_bg_right
.
setRadius
(
50
);
...
...
@@ -1011,7 +1013,9 @@ export class PlayComponent implements OnInit, OnDestroy {
words_content_right
.
fontColor
=
'
#fdcd00
'
;
words_content_right
.
refreshSize
();
words_bg_right
.
addChild
(
words_content_right
);
words_bg_right
.
setScaleXY
(
this
.
mapScale
);
words_bg_right
.
setRadius
(
words_content
.
width
/
3
*
2
);
let
scale_r
=
getMinScale
(
words_bg_right
,
80
)
*
this
.
mapScale
words_bg_right
.
setScaleXY
(
scale_r
);
this
.
body_bg
.
addChild
(
words_bg
);
this
.
words_bg
=
words_bg
;
...
...
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