Skip to content

Commit f9ff892

Browse files
committed
Formatting.
1 parent 723f94c commit f9ff892

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
335335
* 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)
336336
* The Tiled parser now removes the `encoding` parameter so that a subsequent process doesn't try to decode the data again (thanks @MannyC #2412)
337337
* Ensure a parent container is a Group before removing from its hash (thanks @rblopes #2397)
338+
* 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)
338339

339340
### Bug Fixes
340341

src/gameobjects/Text.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ Phaser.Text.prototype.updateText = function () {
375375
var fontProperties = this.determineFontProperties(this.style.font);
376376

377377
var drawnLines = lines.length;
378+
378379
if (this.style.maxLines > 0 && this.style.maxLines < lines.length)
379380
{
380381
drawnLines = this.style.maxLines;

src/pixi/renderers/canvas/CanvasRenderer.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ PIXI.CanvasRenderer = function (game) {
107107
*/
108108
this.refresh = true;
109109

110-
// This is already done in the Game.setUpRenderer method.
111-
// this.view.width = this.width * this.resolution;
112-
// this.view.height = this.height * this.resolution;
113-
114110
/**
115111
* Internal var.
116112
*
@@ -199,8 +195,8 @@ PIXI.CanvasRenderer.prototype.render = function (stage) {
199195
* @method destroy
200196
* @param [removeView=true] {boolean} Removes the Canvas element from the DOM.
201197
*/
202-
PIXI.CanvasRenderer.prototype.destroy = function(removeView)
203-
{
198+
PIXI.CanvasRenderer.prototype.destroy = function (removeView) {
199+
204200
if (removeView === undefined) { removeView = true; }
205201

206202
if (removeView && this.view.parent)
@@ -222,8 +218,8 @@ PIXI.CanvasRenderer.prototype.destroy = function(removeView)
222218
* @param width {Number} the new width of the canvas view
223219
* @param height {Number} the new height of the canvas view
224220
*/
225-
PIXI.CanvasRenderer.prototype.resize = function(width, height)
226-
{
221+
PIXI.CanvasRenderer.prototype.resize = function (width, height) {
222+
227223
this.width = width * this.resolution;
228224
this.height = height * this.resolution;
229225

@@ -236,10 +232,11 @@ PIXI.CanvasRenderer.prototype.resize = function(width, height)
236232
this.view.style.height = this.height / this.resolution + "px";
237233
}
238234

239-
if(this.renderSession.smoothProperty)
235+
if (this.renderSession.smoothProperty)
240236
{
241237
this.context[this.renderSession.smoothProperty] = (this.renderSession.scaleMode === PIXI.scaleModes.LINEAR);
242238
}
239+
243240
};
244241

245242
/**

0 commit comments

Comments
 (0)