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
6b7aed0f
Commit
6b7aed0f
authored
May 19, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复
parent
f4456b7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Container.ts
src/2d/display/Container.ts
+4
-2
Sprite.ts
src/2d/display/Sprite.ts
+4
-2
No files found.
src/2d/display/Container.ts
View file @
6b7aed0f
...
@@ -726,7 +726,8 @@ export default class Container extends DisplayObject {
...
@@ -726,7 +726,8 @@ export default class Container extends DisplayObject {
* @member {number}
* @member {number}
*/
*/
get
width
():
number
{
get
width
():
number
{
return
this
.
_width
||
this
.
scale
.
x
*
this
.
getLocalBounds
().
width
;
let
value
=
this
.
_width
;
return
!
value
&&
value
!=
0
?
this
.
scale
.
x
*
this
.
getLocalBounds
().
width
:
value
;
}
}
set
width
(
value
:
number
)
{
set
width
(
value
:
number
)
{
...
@@ -755,7 +756,8 @@ export default class Container extends DisplayObject {
...
@@ -755,7 +756,8 @@ export default class Container extends DisplayObject {
* @member {number}
* @member {number}
*/
*/
get
height
():
number
{
get
height
():
number
{
return
this
.
_height
||
this
.
scale
.
y
*
this
.
getLocalBounds
().
height
;
let
value
=
this
.
_height
;
return
!
value
&&
value
!=
0
?
this
.
scale
.
y
*
this
.
getLocalBounds
().
height
:
value
;
}
}
set
height
(
value
:
number
)
{
set
height
(
value
:
number
)
{
...
...
src/2d/display/Sprite.ts
View file @
6b7aed0f
...
@@ -391,7 +391,8 @@ export default class Sprite extends Container {
...
@@ -391,7 +391,8 @@ export default class Sprite extends Container {
* @member {number}
* @member {number}
*/
*/
get
width
()
{
get
width
()
{
return
this
.
_width
||
Math
.
abs
(
this
.
scale
.
x
)
*
this
.
_texture
.
orig
.
width
;
let
value
=
this
.
_width
;
return
!
value
&&
value
!=
0
?
Math
.
abs
(
this
.
scale
.
x
)
*
this
.
_texture
.
orig
.
width
:
value
;
}
}
set
width
(
value
)
{
set
width
(
value
)
{
...
@@ -413,7 +414,8 @@ export default class Sprite extends Container {
...
@@ -413,7 +414,8 @@ export default class Sprite extends Container {
* @member {number}
* @member {number}
*/
*/
get
height
()
{
get
height
()
{
return
this
.
_height
||
Math
.
abs
(
this
.
scale
.
y
)
*
this
.
_texture
.
orig
.
height
;
let
value
=
this
.
_height
;
return
!
value
&&
value
!=
0
?
Math
.
abs
(
this
.
scale
.
y
)
*
this
.
_texture
.
orig
.
height
:
value
;
}
}
set
height
(
value
)
{
set
height
(
value
)
{
...
...
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