Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
劳工
zeroing-engine
Commits
02a4abd8
Commit
02a4abd8
authored
May 20, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
c83815d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
Sprite.ts
src/2d/display/Sprite.ts
+8
-9
No files found.
src/2d/display/Sprite.ts
View file @
02a4abd8
...
...
@@ -398,13 +398,13 @@ export default class Sprite extends Container {
set
width
(
value
)
{
if
(
this
.
_width
!==
value
)
{
if
(
!
value
&&
value
!=
0
)
{
this
.
scale
.
x
=
1
this
.
scale
.
x
=
1
;
this
.
_width
=
undefined
;
}
else
{
const
s
=
sign
(
this
.
scale
.
x
)
||
1
;
const
s
=
sign
(
this
.
scale
.
y
)
||
1
;
this
.
scale
.
x
=
s
*
value
/
this
.
_texture
.
orig
.
width
;
this
.
_width
=
value
;
}
this
.
_width
=
value
;
this
.
dispatchEvent
(
Event
.
RESIZE
);
}
}
...
...
@@ -419,16 +419,15 @@ export default class Sprite extends Container {
}
set
height
(
value
)
{
if
(
!
value
&&
value
!=
0
)
{
this
.
_height
=
undefined
;
}
else
{
if
(
this
.
_height
!==
value
)
{
if
(
!
value
&&
value
!=
0
)
{
this
.
scale
.
y
=
1
this
.
scale
.
y
=
1
;
this
.
_height
=
undefined
;
}
else
{
const
s
=
sign
(
this
.
scale
.
y
)
||
1
;
this
.
scale
.
y
=
s
*
value
/
this
.
_texture
.
orig
.
height
;
this
.
_height
=
value
;
}
this
.
_height
=
value
;
this
.
dispatchEvent
(
Event
.
RESIZE
);
}
}
...
...
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