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
8ab26753
Commit
8ab26753
authored
Sep 21, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整卡片大小
parent
6a35ea4d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Exercises.ts
src/app/play/Exercises.ts
+7
-6
No files found.
src/app/play/Exercises.ts
View file @
8ab26753
...
@@ -85,8 +85,8 @@ export class Exercises {
...
@@ -85,8 +85,8 @@ export class Exercises {
}
}
let
width
=
1
101
*
scaleX
-
20
*
scaleX
;
let
width
=
1
021
*
scaleX
;
let
height
=
479
*
scaleY
-
20
*
scaleY
;
let
height
=
399
*
scaleY
;
const
cardBg
=
new
MySprite
();
const
cardBg
=
new
MySprite
();
cardBg
.
init
(
this
.
images
.
get
(
'
box
'
));
cardBg
.
init
(
this
.
images
.
get
(
'
box
'
));
...
@@ -243,7 +243,7 @@ export class Exercises {
...
@@ -243,7 +243,7 @@ export class Exercises {
totalWidth
=
text
.
getBoundingBox
().
width
;
totalWidth
=
text
.
getBoundingBox
().
width
;
bg
.
addChild
(
text
);
bg
.
addChild
(
text
);
text
.
setMaxSize
(
bg
.
width
-
96
*
this
.
scaleX
);
text
.
setMaxSize
(
bg
.
width
-
110
*
this
.
scaleX
);
this
.
textLabel
=
text
;
this
.
textLabel
=
text
;
...
@@ -331,8 +331,9 @@ export class Exercises {
...
@@ -331,8 +331,9 @@ export class Exercises {
index
.
fontName
=
"
TCB
"
;
index
.
fontName
=
"
TCB
"
;
index
.
fontColor
=
'
#ec6101
'
;
index
.
fontColor
=
'
#ec6101
'
;
index
.
setMaxSize
(
45
*
scaleX
);
index
.
setMaxSize
(
45
*
scaleX
);
index
.
x
=
-
index
.
width
/
2
;
index
.
x
=
indexBg
.
x
-
index
.
width
/
2
;
indexBg
.
addChild
(
index
);
index
.
y
=
height
/
2
;
bg
.
addChild
(
index
);
//内容
//内容
this
.
addText
(
bg
,
this
.
skin
);
this
.
addText
(
bg
,
this
.
skin
);
...
@@ -505,7 +506,7 @@ export class Exercises {
...
@@ -505,7 +506,7 @@ export class Exercises {
}
}
contentPic
.
x
=
width
/
2
;
contentPic
.
x
=
width
/
2
;
contentPic
.
y
=
60
*
this
.
scaleY
+
maxHeight
/
2
;
contentPic
.
y
=
39
*
this
.
scaleY
+
maxHeight
/
2
;
contentBg
.
addChild
(
contentPic
);
contentBg
.
addChild
(
contentPic
);
}
}
...
...
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