Source/HexGrid.m
changeset 21 2eb229411d73
parent 10 6c78cc6bd7a6
child 27 b0affce7beb1
     1.1 --- a/Source/HexGrid.m	Thu Jul 03 17:44:30 2008 -0700
     1.2 +++ b/Source/HexGrid.m	Mon Jul 21 17:32:21 2008 -0700
     1.3 @@ -100,7 +100,10 @@
     1.4                 suggestedFrame: (CGRect)frame
     1.5  {
     1.6      // Overridden to stagger the odd-numbered rows
     1.7 -    if( row & 1 )
     1.8 +    BOOL stagger = (row & 1) != 0;
     1.9 +    if( _reversed && (_nRows & 1) )
    1.10 +        stagger = !stagger;
    1.11 +    if( stagger )
    1.12          frame.origin.x += _spacing.width/2;
    1.13      frame.size.height += _capHeight;
    1.14      return [super createCellAtRow: row column: col suggestedFrame: frame];