Skip to content

Commit d774757

Browse files
committed
Preparing for centerX/Y options.
1 parent 7f72c7b commit d774757

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

v3/src/actions/GridAlign.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,23 @@ var GridAlign = function (items, options)
6565
var position = GetObjectValue(options, 'position', CONST.TOP_LEFT);
6666
var x = GetObjectValue(options, 'x', 0);
6767
var y = GetObjectValue(options, 'y', 0);
68-
69-
tempZone.setPosition(x, y);
70-
tempZone.setSize(cellWidth, cellHeight);
68+
// var centerX = GetObjectValue(options, 'centerX', null);
69+
// var centerY = GetObjectValue(options, 'centerY', null);
7170

7271
var cx = 0;
7372
var cy = 0;
7473
var w = (width * cellWidth);
7574
var h = (height * cellHeight);
7675

76+
// If the Grid is centered on a position then we need to calculate it now
77+
// if (centerX !== null && centerY !== null)
78+
// {
79+
//
80+
// }
81+
82+
tempZone.setPosition(x, y);
83+
tempZone.setSize(cellWidth, cellHeight);
84+
7785
for (var i = 0; i < items.length; i++)
7886
{
7987
AlignIn(items[i], tempZone, position);

0 commit comments

Comments
 (0)