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

AnchorLayoutData: convenience methods for anchor display objects #1735

Open
kevinfoley opened this issue Jun 8, 2018 · 0 comments
Open

AnchorLayoutData: convenience methods for anchor display objects #1735

kevinfoley opened this issue Jun 8, 2018 · 0 comments

Comments

@kevinfoley
Copy link
Contributor

Right now, when using an anchor layout, we can anchor one object to another like this:

var ald:AnchorLayoutData = new AnchorLayoutData();
ald.bottom = 5;
ald.bottomAnchorDisplayObject = someGraphic;

This is a bit clumsy, particularly because the property names (e.g. bottomAnchorDisplayObject) are so long.

It would be great to have a convenience method that combined the distance and display object properties into a single function with a shorter name, something like:

public function anchorBottomTo(target:DisplayObject, distance:Number):void

Which we would call like this:

ald.anchorBottomTo(someGraphic, 5);
@joshtynjala joshtynjala changed the title Convience methods for AnchorLayoutData AnchorLayoutData: convenience methods for anchor display objects Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants