Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM5-10
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-10
Commits
65e6f8cd
Commit
65e6f8cd
authored
Feb 01, 2021
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:缩放文字
parent
a39e3835
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
Exercises.spreat.ts
src/app/play/Exercises.spreat.ts
+10
-8
No files found.
src/app/play/Exercises.spreat.ts
View file @
65e6f8cd
...
...
@@ -241,11 +241,11 @@ export class Exercises {
answer
.
fontName
=
"
MMB
"
;
answer
.
setScaleXY
(
this
.
scaleX
);
answer
.
refreshSize
();
answer
.
setMaxSize
(
360
*
this
.
scaleX
);
return
answer
;
}
getTextView2
(
letterArr
)
{
getTextView2
(
letterArr
,
scale
)
{
let
getLabel
=
(
letter
,
fontColor
)
=>
{
const
label
=
new
Label
();
...
...
@@ -255,7 +255,7 @@ export class Exercises {
label
.
fontSize
=
88
;
label
.
fontName
=
"
MMB
"
;
label
.
fontColor
=
fontColor
;
label
.
setScaleXY
(
this
.
scaleX
);
label
.
setScaleXY
(
scale
);
label
.
refreshSize
();
label
.
y
=
label
.
getBoundingBox
().
height
/
2
;
return
label
;
...
...
@@ -339,16 +339,18 @@ export class Exercises {
answerBg
.
addChild
(
line
);
answerBg
.
line
=
line
;
let
text
=
this
.
getTextView2
(
answerData
.
letterArr
);
text
.
x
=
(
w
-
text
.
getBoundingBox
().
width
)
/
2
;
text
.
y
=
h
/
2
-
195
*
this
.
scaleY
+
325
*
this
.
scaleY
;
text
.
alpha
=
0
;
let
text2
=
this
.
getTextView
(
answerData
.
letterArr
);
text2
.
y
=
h
/
2
-
195
*
this
.
scaleY
+
325
*
this
.
scaleY
+
text2
.
getBoundingBox
().
height
/
2
;
text2
.
x
=
text
.
x
;
text2
.
x
=
(
w
-
text2
.
getBoundingBox
().
width
)
/
2
;
text2
.
alpha
=
0
;
let
text
=
this
.
getTextView2
(
answerData
.
letterArr
,
text2
.
scaleX
);
text
.
x
=
text2
.
x
;
text
.
y
=
h
/
2
-
195
*
this
.
scaleY
+
325
*
this
.
scaleY
;
text
.
alpha
=
0
;
answerBg
.
addChild
(
text
);
answerBg
.
addChild
(
text2
);
answerBg
.
text
=
text
;
...
...
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