Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
T_FT_01
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
T_FT_01
Commits
aef97bc1
Commit
aef97bc1
authored
Dec 14, 2020
by
Chen Jiping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:调整上传图片显示的scale
parent
f38618f9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
custom-hot-zone.component.ts
...c/app/common/custom-hot-zone/custom-hot-zone.component.ts
+6
-4
No files found.
form/src/app/common/custom-hot-zone/custom-hot-zone.component.ts
View file @
aef97bc1
...
...
@@ -160,8 +160,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
const
rate1
=
this
.
canvasWidth
/
bg
.
width
;
const
rate2
=
this
.
canvasHeight
/
bg
.
height
;
const
rate
=
Math
.
max
(
rate1
,
rate2
);
bg
.
setScaleXY
(
rate
);
//const rate = Math.max(rate1, rate2);
//bg.setScaleXY(rate);
bg
.
scaleX
=
rate1
;
bg
.
scaleY
=
rate2
;
bg
.
x
=
this
.
canvasWidth
/
2
;
...
...
@@ -980,8 +982,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy, OnChanges {
private
loadHotZonePic
(
pic
:
HotZoneImg
,
url
)
{
const
baseLen
=
this
.
hotZoneImgSize
*
this
.
mapScale
;
pic
.
load
(
url
).
then
(()
=>
{
const
s
=
getMinScale
(
pic
,
baseLen
);
pic
.
setScaleXY
(
s
);
//
const s = getMinScale(pic, baseLen);
pic
.
setScaleXY
(
this
.
mapScale
);
});
}
}
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