zhangtaoeasy / birdeye

Automatically exported from code.google.com/p/birdeye
0 stars 0 forks source link

[NG] Grid - Bug in the clearExcessGeometry function #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Only the half excess geometries was clear.

private function clearExcessGeometries(nbrOfItems:Number):void
{
    while (this.geometryCollection.items.length > nbrOfItems)
    {
        this.geometryCollection.removeItemAt(nbrOfItems++);
    }
}

The items length decreases in the same time that nbrOfItems increases ;-).
It's more efficient to don't increase nbrOfItems.

Original issue reported on code.google.com by nicolascoquelet@gmail.com on 28 Sep 2009 at 1:01

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by f4us...@gmail.com on 28 Sep 2009 at 7:07

GoogleCodeExporter commented 9 years ago

Original comment by f4us...@gmail.com on 29 Sep 2009 at 9:14