Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM-42
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-42
Commits
8cdba501
Commit
8cdba501
authored
Sep 21, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复字体缩放的问题
parent
8ab26753
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
Exercises.ts
src/app/play/Exercises.ts
+4
-2
Title.ts
src/app/play/Title.ts
+2
-0
No files found.
src/app/play/Exercises.ts
View file @
8cdba501
...
@@ -238,6 +238,7 @@ export class Exercises {
...
@@ -238,6 +238,7 @@ export class Exercises {
textArr
.
push
(
labelText
);
textArr
.
push
(
labelText
);
}
}
text
.
setScaleXY
(
this
.
scaleX
);
text
.
refreshSize
();
text
.
refreshSize
();
text
.
y
=
bg
.
height
/
2
;
text
.
y
=
bg
.
height
/
2
;
totalWidth
=
text
.
getBoundingBox
().
width
;
totalWidth
=
text
.
getBoundingBox
().
width
;
...
@@ -330,6 +331,7 @@ export class Exercises {
...
@@ -330,6 +331,7 @@ export class Exercises {
index
.
fontSize
=
64
;
index
.
fontSize
=
64
;
index
.
fontName
=
"
TCB
"
;
index
.
fontName
=
"
TCB
"
;
index
.
fontColor
=
'
#ec6101
'
;
index
.
fontColor
=
'
#ec6101
'
;
index
.
setScaleXY
(
this
.
scaleX
);
index
.
setMaxSize
(
45
*
scaleX
);
index
.
setMaxSize
(
45
*
scaleX
);
index
.
x
=
indexBg
.
x
-
index
.
width
/
2
;
index
.
x
=
indexBg
.
x
-
index
.
width
/
2
;
index
.
y
=
height
/
2
;
index
.
y
=
height
/
2
;
...
@@ -401,7 +403,7 @@ export class Exercises {
...
@@ -401,7 +403,7 @@ export class Exercises {
textArr
.
push
(
labelText
);
textArr
.
push
(
labelText
);
}
}
text
.
setScaleXY
(
this
.
scaleX
);
text
.
setMaxSize
(
960
*
this
.
scaleX
);
text
.
setMaxSize
(
960
*
this
.
scaleX
);
text
.
refreshSize
();
text
.
refreshSize
();
text
.
y
=
bg
.
height
/
2
;
text
.
y
=
bg
.
height
/
2
;
...
@@ -464,7 +466,7 @@ export class Exercises {
...
@@ -464,7 +466,7 @@ export class Exercises {
textArr
.
push
(
labelText
);
textArr
.
push
(
labelText
);
}
}
text
.
setScaleXY
(
this
.
scaleX
);
text
.
setMaxSize
((
960
-
90
)
*
this
.
scaleX
);
text
.
setMaxSize
((
960
-
90
)
*
this
.
scaleX
);
text
.
refreshSize
();
text
.
refreshSize
();
text
.
y
=
bg
.
height
-
text
.
getBoundingBox
().
height
/
2
-
7
*
this
.
scaleY
;
text
.
y
=
bg
.
height
-
text
.
getBoundingBox
().
height
/
2
-
7
*
this
.
scaleY
;
...
...
src/app/play/Title.ts
View file @
8cdba501
...
@@ -51,6 +51,7 @@ export class Title {
...
@@ -51,6 +51,7 @@ export class Title {
part1
.
fontSize
=
48
;
part1
.
fontSize
=
48
;
part1
.
fontName
=
"
BRLNSDB
"
;
part1
.
fontName
=
"
BRLNSDB
"
;
part1
.
fontColor
=
"
#ffffff
"
;
part1
.
fontColor
=
"
#ffffff
"
;
part1
.
setScaleXY
(
mapScaleX
);
part1
.
refreshSize
();
part1
.
refreshSize
();
part1
.
x
=
pWidth
-
part1
.
getBoundingBox
().
width
-
13
*
mapScaleX
;
part1
.
x
=
pWidth
-
part1
.
getBoundingBox
().
width
-
13
*
mapScaleX
;
titleBg
.
addChild
(
part1
);
titleBg
.
addChild
(
part1
);
...
@@ -61,6 +62,7 @@ export class Title {
...
@@ -61,6 +62,7 @@ export class Title {
part2
.
fontSize
=
36
;
part2
.
fontSize
=
36
;
part2
.
fontName
=
"
FUTURA
"
;
part2
.
fontName
=
"
FUTURA
"
;
part2
.
fontColor
=
"
#000000
"
;
part2
.
fontColor
=
"
#000000
"
;
part2
.
setScaleXY
(
mapScaleX
);
part2
.
refreshSize
();
part2
.
refreshSize
();
part2
.
x
=
titePart1Bg
.
getBoundingBox
().
width
+
11
*
mapScaleX
;
part2
.
x
=
titePart1Bg
.
getBoundingBox
().
width
+
11
*
mapScaleX
;
part2
.
y
=
10
*
mapScaleY
+
part2
.
getBoundingBox
().
height
/
2
;
part2
.
y
=
10
*
mapScaleY
+
part2
.
getBoundingBox
().
height
/
2
;
...
...
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