Skip to content

Commit 4fb7430

Browse files
committed
Array configs come first.
1 parent 0d4b36f commit 4fb7430

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

v3/src/math/MinMax2.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ var MinMax2 = new Class({
1313

1414
function MinMax2 (min, max)
1515
{
16-
if (typeof min === 'object')
16+
if (Array.isArray(min))
17+
{
18+
max = min[1];
19+
min = min[0];
20+
}
21+
else if (typeof min === 'object')
1722
{
1823
var obj = min;
1924

@@ -32,7 +37,12 @@ var MinMax2 = new Class({
3237

3338
set: function (min, max)
3439
{
35-
if (typeof min === 'object')
40+
if (Array.isArray(min))
41+
{
42+
max = min[1];
43+
min = min[0];
44+
}
45+
else if (typeof min === 'object')
3646
{
3747
var obj = min;
3848

v3/src/math/MinMax4.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@ var MinMax4 = new Class({
5555

5656
set: function (xMin, xMax, yMin, yMax)
5757
{
58-
if (typeof xMin === 'object')
58+
if (Array.isArray(xMin))
59+
{
60+
var arr = xMin;
61+
62+
xMin = arr[0];
63+
xMax = arr[1];
64+
yMin = arr[2];
65+
yMax = arr[3];
66+
}
67+
else if (typeof xMin === 'object')
5968
{
6069
var obj = xMin;
6170

0 commit comments

Comments
 (0)