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
f56ac129
Commit
f56ac129
authored
Jan 28, 2021
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复图片显示问题
parent
f7538b0c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
form.component.html
src/app/form/form.component.html
+1
-1
Exercises.spreat.ts
src/app/play/Exercises.spreat.ts
+5
-17
No files found.
src/app/form/form.component.html
View file @
f56ac129
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
</nz-form-item>
</nz-form-item>
<nz-card
nzTitle=
"弹窗内容设置"
>
<nz-card
nzTitle=
"弹窗内容设置"
>
<div
nz-card-grid
[
ngStyle
]="
gridStyle
"
>
<div
nz-card-grid
[
ngStyle
]="
gridStyle
"
>
<nz-divider
nzText=
"弹
转
左边"
></nz-divider>
<nz-divider
nzText=
"弹
窗
左边"
></nz-divider>
<nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
4
"
>
图片
</nz-form-label>
<nz-form-label
[
nzSpan
]="
4
"
>
图片
</nz-form-label>
<nz-form-control
[
nzSpan
]="
8
"
>
<nz-form-control
[
nzSpan
]="
8
"
>
...
...
src/app/play/Exercises.spreat.ts
View file @
f56ac129
...
@@ -86,11 +86,7 @@ export class Exercises {
...
@@ -86,11 +86,7 @@ export class Exercises {
bg
.
addChild
(
pic
);
bg
.
addChild
(
pic
);
let
scale
=
Math
.
min
(
maxW
/
pic
.
width
,
maxH
/
pic
.
height
);
let
scale
=
Math
.
min
(
maxW
/
pic
.
width
,
maxH
/
pic
.
height
);
//如果小于1,则缩放图片
pic
.
setScaleXY
(
scale
);
if
(
scale
<
1
)
{
pic
.
setScaleXY
(
scale
);
}
}
}
initIndex
()
{
initIndex
()
{
...
@@ -257,17 +253,13 @@ export class Exercises {
...
@@ -257,17 +253,13 @@ export class Exercises {
answerBg
.
fillColor
=
"
#e5edf2
"
;
answerBg
.
fillColor
=
"
#e5edf2
"
;
answerBg
.
y
=
(
this
.
bigCard
.
height
-
h
)
/
2
;
answerBg
.
y
=
(
this
.
bigCard
.
height
-
h
)
/
2
;
let
maxH
=
2
57
*
this
.
scaleY
;
let
maxH
=
2
60
*
this
.
scaleY
;
let
maxW
=
w
;
let
maxW
=
260
*
this
.
scaleX
;
const
pic
=
new
MySprite
();
const
pic
=
new
MySprite
();
pic
.
init
(
this
.
images
.
get
(
answerData
.
picUrl
));
pic
.
init
(
this
.
images
.
get
(
answerData
.
picUrl
));
let
scale
=
Math
.
min
(
maxW
/
pic
.
width
,
maxH
/
pic
.
height
);
let
scale
=
Math
.
min
(
maxW
/
pic
.
width
,
maxH
/
pic
.
height
);
pic
.
setScaleXY
(
scale
);
//如果小于1,则缩放图片
if
(
scale
<
1
)
{
pic
.
setScaleXY
(
scale
);
}
answerBg
.
addChild
(
pic
);
answerBg
.
addChild
(
pic
);
pic
.
x
=
w
/
2
;
pic
.
x
=
w
/
2
;
...
@@ -315,11 +307,7 @@ export class Exercises {
...
@@ -315,11 +307,7 @@ export class Exercises {
pic
.
y
=
h
/
2
;
pic
.
y
=
h
/
2
;
let
scale
=
Math
.
min
(
w
/
pic
.
width
,
h
/
pic
.
height
);
let
scale
=
Math
.
min
(
w
/
pic
.
width
,
h
/
pic
.
height
);
pic
.
setScaleXY
(
scale
);
//如果小于1,则缩放图片
if
(
scale
<
1
)
{
pic
.
setScaleXY
(
scale
);
}
backCard
.
addChild
(
pic
);
backCard
.
addChild
(
pic
);
}
}
...
...
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