()
| 891 | // Handle property changes | 处理属性变化 |
| 892 | |
| 893 | protected handleXYChanged(): void { |
| 894 | let xv = this._x; |
| 895 | let yv = this._y + this._yOffset; |
| 896 | |
| 897 | if (this._pivotAsAnchor) { |
| 898 | xv -= this._pivotX * this._width; |
| 899 | yv -= this._pivotY * this._height; |
| 900 | } |
| 901 | |
| 902 | if (this._pixelSnapping) { |
| 903 | xv = Math.round(xv); |
| 904 | yv = Math.round(yv); |
| 905 | } |
| 906 | |
| 907 | if (this._displayObject) { |
| 908 | this._displayObject.setPosition(xv + this._pivotOffsetX, yv + this._pivotOffsetY); |
| 909 | } |
| 910 | } |
| 911 | |
| 912 | protected handleSizeChanged(): void { |
| 913 | if (this._displayObject) { |
no test coverage detected