Skip to content

Commit 60541e8

Browse files
Updates geom, width and height of the Ellipse GO
Updates the `width`, `height`, and geometric position of the Ellipse in the `setSize()` method. This code shows the wrong positioning of the Ellipse: https://codepen.io/phasereditor2d/pen/jOrvexM To fix it, uncomment lines `21`, `24`, and `25`.
1 parent 0d23aea commit 60541e8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/gameobjects/shape/ellipse/Ellipse.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ var Ellipse = new Class({
125125
*/
126126
setSize: function (width, height)
127127
{
128+
this.width = width;
129+
this.height = height;
130+
this.geom.setPosition(width / 2, height / 2);
128131
this.geom.setSize(width, height);
129132

130133
return this.updateData();

0 commit comments

Comments
 (0)