mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 06:00:56 -05:00
Shorten code a bit.
This commit is contained in:
parent
b832787f7f
commit
5093648bd1
1 changed files with 2 additions and 4 deletions
|
@ -560,10 +560,8 @@ function(name) {
|
|||
// If we're returning 'bounds', create a LinkedRectangle that uses the
|
||||
// setBounds() setter to update the Item whenever the bounds are
|
||||
// changed:
|
||||
if (name == 'bounds')
|
||||
bounds = LinkedRectangle.create(this, 'setBounds',
|
||||
bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
return bounds;
|
||||
return name == 'bounds' ? LinkedRectangle.create(this, 'setBounds',
|
||||
bounds.x, bounds.y, bounds.width, bounds.height) : bounds;
|
||||
};
|
||||
}, /** @lends Item# */{
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue