Skip to content

Commit 458c592

Browse files
committed
Changing the radius of an Arc Game Object wouldn't update the size, causing origin issues. It now updates the size and origin correctly in WebGL. Fix phaserjs#4542
1 parent 515adc7 commit 458c592

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ The following changes took place in the Pointer class:
120120
* The ScaleManager full screen call had an arrow function in it. Despite being within a conditional block of code it still broke really old browsers like IE11, so has been removed. Fix #4530 (thanks @jorbascrumps @CNDW)
121121
* `Game.getTime` would return `NaN` because it incorrectly accessed the time value from the TimeStep.
122122
* Text with a `fixedWidth` or `fixedHeight` could cause the canvas to be cropped if less than the size of the Text itself (thanks @rexrainbow)
123+
* Changing the `radius` of an Arc Game Object wouldn't update the size, causing origin issues. It now updates the size and origin correctly in WebGL. Fix #4542 (thanks @@PhaserEditor2D)
123124

124125
### Examples, Documentation and TypeScript
125126

src/gameobjects/shape/arc/Arc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ var Arc = new Class({
164164
{
165165
this.geom.radius = value;
166166

167+
this.setSize(value, value);
168+
this.updateDisplayOrigin();
167169
this.updateData();
168170
}
169171

0 commit comments

Comments
 (0)