mirror of
https://github.com/wassname/phaser.git
synced 2026-08-02 13:00:25 +08:00
Added class constructors, fixed Stripshader, added relative Tween example and updated Tween source.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -667,3 +667,5 @@ Phaser.Device.prototype = {
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Device.prototype.constructor = Phaser.Device;
|
||||
|
||||
@@ -154,4 +154,6 @@ Phaser.RequestAnimationFrame.prototype = {
|
||||
return (this._isSetTimeOut === false);
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Phaser.RequestAnimationFrame.prototype.constructor = Phaser.RequestAnimationFrame;
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user