A nice getter/setter for our lovely users
This commit is contained in:
parent
57d7e373ec
commit
138511f46c
1 changed files with 31 additions and 1 deletions
|
@ -514,4 +514,34 @@ PIXI.DisplayObject.prototype._renderCanvas = function(renderSession)
|
|||
// OVERWRITE;
|
||||
// this line is just here to pass jshinting :)
|
||||
renderSession = renderSession;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* The position of the displayObject on the x axis relative to the local coordinates of the parent.
|
||||
*
|
||||
* @property x
|
||||
* @type Number
|
||||
*/
|
||||
Object.defineProperty(PIXI.DisplayObject.prototype, 'x', {
|
||||
get: function() {
|
||||
return this.position.x;
|
||||
},
|
||||
set: function(value) {
|
||||
this.position.x = value;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The position of the displayObject on the y axis relative to the local coordinates of the parent.
|
||||
*
|
||||
* @property y
|
||||
* @type Number
|
||||
*/
|
||||
Object.defineProperty(PIXI.DisplayObject.prototype, 'y', {
|
||||
get: function() {
|
||||
return this.position.y;
|
||||
},
|
||||
set: function(value) {
|
||||
this.position.y = value;
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue