Skip to content

Commit 2b850ad

Browse files
committed
Setting the anchor dirties the Transform.
1 parent fd38987 commit 2b850ad

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/gameobjects/GameObject.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,7 @@ Object.defineProperties(Phaser.GameObject.prototype, {
192192

193193
set: function (value)
194194
{
195-
this.transform._anchorX = value;
196-
this.transform._anchorY = value;
195+
this.transform.setAnchor(value);
197196
}
198197

199198
},
@@ -210,6 +209,7 @@ Object.defineProperties(Phaser.GameObject.prototype, {
210209
set: function (value)
211210
{
212211
this.transform._anchorX = value;
212+
this.transform.dirty = true;
213213
}
214214

215215
},
@@ -226,6 +226,7 @@ Object.defineProperties(Phaser.GameObject.prototype, {
226226
set: function (value)
227227
{
228228
this.transform._anchorY = value;
229+
this.transform.dirty = true;
229230
}
230231

231232
},

0 commit comments

Comments
 (0)