Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layouts should draw all items at once, not once per current layout manager #1

Open
arpit opened this issue Jul 29, 2011 · 0 comments
Open

Comments

@arpit
Copy link
Owner

arpit commented Jul 29, 2011

The draw method on the main TreeMap class draws once the layout managers change. It should really maintain all the layout managers in an internal Array and draw them all at once. This also allows things like redraw without having to compute the rectangles all over again.

public function draw():void{

        var rects:Array = currentLayoutManager.getRects();
        for each(var treeRect:TreeRect in rects){
            var renderer:DisplayObject = new _renderer() as DisplayObject;
            addChild(renderer);
            ITreeMapRenderer(renderer).draw(this, treeRect);
            renderer.x = treeRect.rect.x
            renderer.y = treeRect.rect.y;
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant