fix issue with worldVisible on Stage

This commit is contained in:
Chad Engler 2014-01-03 22:07:40 -08:00
parent e08559771a
commit 4c62e8fc16

View file

@ -303,15 +303,14 @@ Object.defineProperty(PIXI.DisplayObject.prototype, 'interactive', {
*/
Object.defineProperty(PIXI.DisplayObject.prototype, 'worldVisible', {
get: function() {
var item = this;
do
{
if(!item.visible)return false;
item = item.parent;
}
while(item.parent);
while(item && item.parent);
return true;
}
@ -326,11 +325,8 @@ Object.defineProperty(PIXI.DisplayObject.prototype, 'worldVisible', {
* @type Graphics
*/
Object.defineProperty(PIXI.DisplayObject.prototype, 'mask', {
get: function() {
return this._mask;
},
set: function(value) {
@ -368,8 +364,6 @@ Object.defineProperty(PIXI.DisplayObject.prototype, 'filters', {
// TODO change this as it is legacy
this._filterBlock = {target:this, filterPasses:passes};
}
this._filters = value;
@ -453,4 +447,4 @@ PIXI.DisplayObject.prototype._renderCanvas = function(renderSession)
PIXI.EmptyRectangle = new PIXI.Rectangle(0,0,0,0);
PIXI.visibleCount = 0;
PIXI.visibleCount = 0;