Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source.

This commit is contained in:
photonstorm
2013-12-30 16:54:00 +00:00
parent fdbdd81b7b
commit ce4cf531d4
59 changed files with 324 additions and 149 deletions
+6 -6
View File
@@ -146,7 +146,7 @@ Phaser.Canvas = {
* @method Phaser.Canvas.addToDOM
* @param {HTMLCanvasElement} canvas - The canvas to set the touch action on.
* @param {string|HTMLElement} parent - The DOM element to add the canvas to.
* @param {boolean} overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element.
* @param {boolean} [overflowHidden=true] - If set to true it will add the overflow='hidden' style to the parent DOM element.
* @return {HTMLCanvasElement} Returns the source canvas.
*/
addToDOM: function (canvas, parent, overflowHidden) {
@@ -167,11 +167,6 @@ Phaser.Canvas = {
// quick test for a HTMLelement
target = parent;
}
if (overflowHidden)
{
target.style.overflow = 'hidden';
}
}
// Fallback, covers an invalid ID and a non HTMLelement object
@@ -180,6 +175,11 @@ Phaser.Canvas = {
target = document.body;
}
if (overflowHidden && target.style)
{
target.style.overflow = 'hidden';
}
target.appendChild(canvas);
return canvas;
+2
View File
@@ -667,3 +667,5 @@ Phaser.Device.prototype = {
}
};
Phaser.Device.prototype.constructor = Phaser.Device;
+3 -1
View File
@@ -154,4 +154,6 @@ Phaser.RequestAnimationFrame.prototype = {
return (this._isSetTimeOut === false);
}
};
};
Phaser.RequestAnimationFrame.prototype.constructor = Phaser.RequestAnimationFrame;
+2
View File
@@ -734,6 +734,8 @@ Phaser.StageScaleMode.prototype = {
};
Phaser.StageScaleMode.prototype.constructor = Phaser.StageScaleMode;
/**
* @name Phaser.StageScaleMode#isFullScreen
* @property {boolean} isFullScreen - Returns true if the browser is in full screen mode, otherwise false.