How to bottom-align cells in a DataGroup using TileLayout?

后端 未结 1 1783
耶瑟儿~
耶瑟儿~ 2021-01-26 00:58

I\'d like to bottom-align cells in a tiled DataGroup, so that rows grow bottom-top instead of top-bottom. I guess what i\'m looking for is something like RowAlign.BOTTOM

相关标签:
1条回答
  • 2021-01-26 01:49

    Yes i want to answer my own question. What i wanted to do was extend TileLayout and override updateDisplayList(), but due to excessive use of privates in TileList that was not possible so i ended up copying the whole TileList source and changed a few lines in updateDisplayList(), eg:

    var yPos:Number = unscaledHeight - visibleStartY - _rowHeight; 
    

    and

    yPos -= yMajorDelta;
    

    and

    // Move along the minor axis
    if (++counter >= counterLimit)
    {
        counter = 0;
        if (orientation == TileOrientation.ROWS)
        {
            xPos = 0;
            yPos -= yMinorDelta;
        }
        else
        {
            xPos += xMinorDelta;
            yPos = unscaledHeight - visibleStartY - _rowHeight;
        }
    }
    

    a hack, sort of, but works fine for my needs.

    0 讨论(0)
提交回复
热议问题