Skip to content

Handling getBounds in a similar way to the classic Display List #1033

Open
@rthery

Description

@rthery

Currently in Starling, if we do a source.getBounds(target) where source and target have no common parent, we end up with an exception thrown from DisplayObject.findCommonParent(). This can happen when one of them has not been added to the stage for example.

But doing the same in the classic Display List seem to return the bounds from the highest parent of target instead from the tests we did.

This difference makes it harder to port to Starling an application using flash.display classes relying on this method. Would it be possible to reproduce the same behaviour in Starling ?

We have already modified Starling to support it on our branch, I'll push that commit on GitHub once that ticket has been submitted, and I can do a pull request if you are interested.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions