Skip to content

Commit d46662c

Browse files
committed
Swapped to using Number.MAX_VALUE so repeat -1 now works properly in IE11 and below.
1 parent 86fe054 commit d46662c

7 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/curves/path/Path.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@ var Path = new Class({
282282
if (out === undefined) { out = new Rectangle(); }
283283
if (accuracy === undefined) { accuracy = 16; }
284284

285-
out.x = Number.MAX_SAFE_INTEGER;
286-
out.y = Number.MAX_SAFE_INTEGER;
285+
out.x = Number.MAX_VALUE;
286+
out.y = Number.MAX_VALUE;
287287

288288
var bounds = new Rectangle();
289289
var maxRight = Number.MIN_SAFE_INTEGER;

src/gameobjects/components/Animation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ var Animation = new Class({
180180
var anim = this.currentAnim;
181181

182182
// Should give us 9,007,199,254,740,991 safe repeats
183-
this.repeatCounter = (this._repeat === -1) ? Number.MAX_SAFE_INTEGER : this._repeat;
183+
this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;
184184

185185
anim.getFirstTick(this);
186186

src/geom/rectangle/FromPoints.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ var FromPoints = function (points, out)
2828
return out;
2929
}
3030

31-
var minX = Number.MAX_SAFE_INTEGER;
32-
var minY = Number.MAX_SAFE_INTEGER;
31+
var minX = Number.MAX_VALUE;
32+
var minY = Number.MAX_VALUE;
3333

3434
var maxX = Number.MIN_SAFE_INTEGER;
3535
var maxY = Number.MIN_SAFE_INTEGER;

src/physics/arcade/World.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ var World = new Class({
204204
{
205205
var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });
206206

207-
graphic.setZ(Number.MAX_SAFE_INTEGER);
207+
graphic.setZ(Number.MAX_VALUE);
208208

209209
this.debugGraphic = graphic;
210210

src/physics/arcade/utils/Closest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var Closest = function (source)
44
{
55
var bodies = this.tree.all();
66

7-
var min = Number.MAX_SAFE_INTEGER;
7+
var min = Number.MAX_VALUE;
88
var closest = null;
99
var x = source.x;
1010
var y = source.y;

src/physics/impact/World.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ var World = new Class({
218218
{
219219
var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });
220220

221-
graphic.setZ(Number.MAX_SAFE_INTEGER);
221+
graphic.setZ(Number.MAX_VALUE);
222222

223223
this.debugGraphic = graphic;
224224

src/physics/matter-js/World.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ var World = new Class({
223223
{
224224
var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });
225225

226-
graphic.setZ(Number.MAX_SAFE_INTEGER);
226+
graphic.setZ(Number.MAX_VALUE);
227227

228228
this.debugGraphic = graphic;
229229

0 commit comments

Comments
 (0)