From b3aac9a4e11154fd35ca0af403d0882fd2d9108a Mon Sep 17 00:00:00 2001 From: antt001 Date: Tue, 29 Dec 2015 19:28:28 +0200 Subject: [PATCH] init with empty texture (fix for issues 2) fixed artifact of previous image appear on transparent 9 patch images --- src/NinePatchImage.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NinePatchImage.es6 b/src/NinePatchImage.es6 index dacd155..feea960 100644 --- a/src/NinePatchImage.es6 +++ b/src/NinePatchImage.es6 @@ -15,7 +15,7 @@ export default class NinePatchImage extends Phaser.Image { * @param {NinePatchCache} ninePatchImages - To be deprecated. */ constructor(game, x = 0, y = 0, key, ninePatchImages) { - super(game, x, y); + super(game, x, y, PIXI.Texture.emptyTexture); game.add.existing(this); /** Get the NinePatchCache instance */ if (!ninePatchImages) { @@ -69,4 +69,4 @@ export default class NinePatchImage extends Phaser.Image { } } } -} \ No newline at end of file +}