Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
unit_demo
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
unit_demo
Commits
10733565
Commit
10733565
authored
Sep 15, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 缩放
parent
3df3f038
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Unit.ts
form/src/app/play/Unit.ts
+2
-3
No files found.
form/src/app/play/Unit.ts
View file @
10733565
...
...
@@ -1714,9 +1714,9 @@ export class ScrollView extends MySprite {
const
viewRect
=
this
.
getBoundingBox
();
if
(
this
.
scrollSide
==
ScrollSideType
.
VERTICAL
)
{
//
sprite.setScaleXY(viewRect.width / sprite.width);
sprite
.
setScaleXY
(
viewRect
.
width
/
sprite
.
width
);
}
else
{
//
sprite.setScaleXY(viewRect.height / sprite.height);
sprite
.
setScaleXY
(
viewRect
.
height
/
sprite
.
height
);
}
if
(
this
.
scrollSide
==
ScrollSideType
.
VERTICAL
)
{
...
...
@@ -1771,7 +1771,6 @@ export class ScrollView extends MySprite {
this
.
content
.
y
=
between
(
this
.
touchStartContentPos
.
y
+
offsetY
,
0
,
this
.
getBoundingBox
().
height
-
this
.
content
.
height
);
}
else
{
this
.
content
.
x
=
between
(
this
.
touchStartContentPos
.
x
+
offsetX
,
0
,
this
.
getBoundingBox
().
width
-
this
.
content
.
width
);
}
}
...
...
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