Fixed bug where setText not working correctly

Docs updated
This commit is contained in:
Mat Groves 2014-01-05 18:16:04 +00:00
parent 8cd32d392c
commit 75c7880c93
119 changed files with 2398 additions and 906 deletions

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>src/pixi/display/DisplayObjectContainer.js - Pixi.JS</title>
<title>src/pixi/display/DisplayObjectContainer.js - pixi.js</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
@ -15,7 +15,7 @@
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="Pixi.JS"></h1>
<h1><img src="http://www.goodboydigital.com/pixijs/logo_small.png" title="pixi.js"></h1>
</div>
<div class="yui3-u-1-4 version">
@ -43,6 +43,8 @@
<li><a href="../classes/AbstractFilter.html">AbstractFilter</a></li>
<li><a href="../classes/AlphaMaskFilter.html">AlphaMaskFilter</a></li>
<li><a href="../classes/AssetLoader.html">AssetLoader</a></li>
<li><a href="../classes/AtlasLoader.html">AtlasLoader</a></li>
@ -213,14 +215,15 @@ PIXI.DisplayObjectContainer.prototype.constructor = PIXI.DisplayObjectContainer;
/*
Object.defineProperty(PIXI.DisplayObjectContainer.prototype, &#x27;width&#x27;, {
get: function() {
return this.scale.x * this.getBounds().width;
return this.scale.x * this.getLocalBounds().width;
},
set: function(value) {
this.scale.x = value / (this.getBounds().width/this.scale.x);
this.scale.x = value / (this.getLocalBounds().width/this.scale.x);
this._width = value;
}
});
*/
/**
* The height of the displayObjectContainer, setting this will actually modify the scale to acheive the value set
*
@ -231,10 +234,10 @@ Object.defineProperty(PIXI.DisplayObjectContainer.prototype, &#x27;width&#x27;,
/*
Object.defineProperty(PIXI.DisplayObjectContainer.prototype, &#x27;height&#x27;, {
get: function() {
return this.scale.y * this.getBounds().height;
return this.scale.y * this.getLocalBounds().height;
},
set: function(value) {
this.scale.y = value / (this.getBounds().height/this.scale.y);
this.scale.y = value / (this.getLocalBounds().height/this.scale.y);
this._height = value;
}
});
@ -248,7 +251,7 @@ Object.defineProperty(PIXI.DisplayObjectContainer.prototype, &#x27;height&#x27;,
*/
PIXI.DisplayObjectContainer.prototype.addChild = function(child)
{
if(child.parent)
if(child.parent &amp;&amp; child.parent !== this)
{
//// COULD BE THIS???
child.parent.removeChild(child);
@ -333,7 +336,7 @@ PIXI.DisplayObjectContainer.prototype.getChildAt = function(index)
}
else
{
throw new Error(&#x27;Both the supplied DisplayObjects must be a child of the caller &#x27; + this);
throw new Error(&#x27;The supplied DisplayObjects must be a child of the caller &#x27; + this);
}
};
@ -445,10 +448,10 @@ PIXI.DisplayObjectContainer.prototype.removeStageReference = function()
for(var i=0,j=this.children.length; i&lt;j; i++)
{
var child = this.children[i];
if(child.interactive)this.stage.dirty = true;
child.removeStageReference();
child.stage = null;
}
this.stage = null;
};
PIXI.DisplayObjectContainer.prototype._renderWebGL = function(renderSession)
@ -516,6 +519,8 @@ PIXI.DisplayObjectContainer.prototype._renderCanvas = function(renderSession)
}
};
</pre>
</div>