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/DisplayObject.js - Pixi.JS</title>
<title>src/pixi/display/DisplayObject.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>
@ -296,6 +298,13 @@ PIXI.DisplayObject = function()
*/
this._interactive = false;
/**
* This is the curser that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true
*
* @property defaultCursor
* @type String
*
*/
this.defaultCursor = &#x27;pointer&#x27;;
/**
@ -351,6 +360,7 @@ PIXI.DisplayObject = function()
*/
this._bounds = new PIXI.Rectangle(0, 0, 1, 1);
this._currentBounds = null;
this._mask = null;
/*
* MOUSE Callbacks
@ -462,6 +472,27 @@ Object.defineProperty(PIXI.DisplayObject.prototype, &#x27;interactive&#x27;, {
}
});
/**
* [read-only] Indicates if the sprite is globaly visible.
*
* @property worldVisible
* @type Boolean
*/
Object.defineProperty(PIXI.DisplayObject.prototype, &#x27;worldVisible&#x27;, {
get: function() {
var item = this;
do
{
if(!item.visible)return false;
item = item.parent;
}
while(item &amp;&amp; item.parent);
return true;
}
});
/**
* Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it.
* In PIXI a regular mask must be a PIXI.Ggraphics object. This allows for much faster masking in canvas as it utilises shape clipping.
@ -471,11 +502,8 @@ Object.defineProperty(PIXI.DisplayObject.prototype, &#x27;interactive&#x27;, {
* @type Graphics
*/
Object.defineProperty(PIXI.DisplayObject.prototype, &#x27;mask&#x27;, {
get: function() {
return this._mask;
},
set: function(value) {
@ -513,8 +541,6 @@ Object.defineProperty(PIXI.DisplayObject.prototype, &#x27;filters&#x27;, {
// TODO change this as it is legacy
this._filterBlock = {target:this, filterPasses:passes};
}
this._filters = value;
@ -576,12 +602,26 @@ PIXI.DisplayObject.prototype.updateTransform = function()
this.vcount = PIXI.visibleCount;
};
PIXI.DisplayObject.prototype.getBounds = function()
{
return PIXI.EmptyRectangle;
};
PIXI.DisplayObject.prototype.getLocalBounds = function()
{
var matrixCache = this.worldTransform;
this.worldTransform = PIXI.identityMatrix;
this.updateTransform();
var bounds = this.getBounds();
this.worldTransform = matrixCache;
return bounds;
};
PIXI.DisplayObject.prototype._renderWebGL = function(renderSession)
{
@ -600,6 +640,7 @@ PIXI.DisplayObject.prototype._renderCanvas = function(renderSession)
PIXI.EmptyRectangle = new PIXI.Rectangle(0,0,0,0);
PIXI.visibleCount = 0;
</pre>
</div>