diff --git a/src/renderable/nineslicesprite.js b/src/renderable/nineslicesprite.js index 2d5c218914..2671d5b321 100644 --- a/src/renderable/nineslicesprite.js +++ b/src/renderable/nineslicesprite.js @@ -47,7 +47,7 @@ class NineSliceSprite extends Sprite { this.width = Math.floor(settings.width); this.height = Math.floor(settings.height); - // nine slice sprite specific local variables + // nine slice sprite specific internal variables this.nss_width = this.width; this.nss_height = this.height; @@ -55,6 +55,32 @@ class NineSliceSprite extends Sprite { this.insety = settings.insety; } + /** + * width of the NineSliceSprite + * @public + * @type {number} + * @name width + */ + get width() { + return super.width; + } + set width(value) { + super.width = this.nss_width = value; + } + + /** + * height of the NineSliceSprite + * @public + * @type {number} + * @name height + */ + get height() { + return super.height; + } + set height(value) { + super.height = this.nss_height = value; + } + /** * @ignore */