Formatting.

This commit is contained in:
photonstorm 2016-04-04 21:21:23 +01:00
parent 723f94cd3b
commit f9ff892510
3 changed files with 8 additions and 9 deletions

View file

@ -335,6 +335,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
* The Tiled parser only supports un-compressed layer data. Previously it would silently fail, now it detects if layer compression is used and displays a console warning instead (thanks @MannyC #2413) * The Tiled parser only supports un-compressed layer data. Previously it would silently fail, now it detects if layer compression is used and displays a console warning instead (thanks @MannyC #2413)
* The Tiled parser now removes the `encoding` parameter so that a subsequent process doesn't try to decode the data again (thanks @MannyC #2412) * The Tiled parser now removes the `encoding` parameter so that a subsequent process doesn't try to decode the data again (thanks @MannyC #2412)
* Ensure a parent container is a Group before removing from its hash (thanks @rblopes #2397) * Ensure a parent container is a Group before removing from its hash (thanks @rblopes #2397)
* PIXI.CanvasRenderer.resize now applies the `renderSession.smoothProperty` to the Canvas context when it resizes. This should help with unwanted canvas smoothing (thanks @sergey7c4 #2395 #2317)
### Bug Fixes ### Bug Fixes

View file

@ -375,6 +375,7 @@ Phaser.Text.prototype.updateText = function () {
var fontProperties = this.determineFontProperties(this.style.font); var fontProperties = this.determineFontProperties(this.style.font);
var drawnLines = lines.length; var drawnLines = lines.length;
if (this.style.maxLines > 0 && this.style.maxLines < lines.length) if (this.style.maxLines > 0 && this.style.maxLines < lines.length)
{ {
drawnLines = this.style.maxLines; drawnLines = this.style.maxLines;

View file

@ -107,10 +107,6 @@ PIXI.CanvasRenderer = function (game) {
*/ */
this.refresh = true; this.refresh = true;
// This is already done in the Game.setUpRenderer method.
// this.view.width = this.width * this.resolution;
// this.view.height = this.height * this.resolution;
/** /**
* Internal var. * Internal var.
* *
@ -199,8 +195,8 @@ PIXI.CanvasRenderer.prototype.render = function (stage) {
* @method destroy * @method destroy
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM. * @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
*/ */
PIXI.CanvasRenderer.prototype.destroy = function(removeView) PIXI.CanvasRenderer.prototype.destroy = function (removeView) {
{
if (removeView === undefined) { removeView = true; } if (removeView === undefined) { removeView = true; }
if (removeView && this.view.parent) if (removeView && this.view.parent)
@ -222,8 +218,8 @@ PIXI.CanvasRenderer.prototype.destroy = function(removeView)
* @param width {Number} the new width of the canvas view * @param width {Number} the new width of the canvas view
* @param height {Number} the new height of the canvas view * @param height {Number} the new height of the canvas view
*/ */
PIXI.CanvasRenderer.prototype.resize = function(width, height) PIXI.CanvasRenderer.prototype.resize = function (width, height) {
{
this.width = width * this.resolution; this.width = width * this.resolution;
this.height = height * this.resolution; this.height = height * this.resolution;
@ -236,10 +232,11 @@ PIXI.CanvasRenderer.prototype.resize = function(width, height)
this.view.style.height = this.height / this.resolution + "px"; this.view.style.height = this.height / this.resolution + "px";
} }
if(this.renderSession.smoothProperty) if (this.renderSession.smoothProperty)
{ {
this.context[this.renderSession.smoothProperty] = (this.renderSession.scaleMode === PIXI.scaleModes.LINEAR); this.context[this.renderSession.smoothProperty] = (this.renderSession.scaleMode === PIXI.scaleModes.LINEAR);
} }
}; };
/** /**