Skip to content

WrapContent does not ignore hidden views #189

@marclefrancois

Description

@marclefrancois

Just came across an unexpected behaviour.

Lets says i have a view with 3 subviews that i layout side by side. if i hide one of the views, wrapContent on the parent view does not skip the hidden View so the parent ends up being too wide.

I was wondering if adding the following at the beginning of the wrapContent method would be desirable:

let subviews = view.subviews.filter { (view) -> Bool in
            return view.isVisible
        }

It requires adding isVisible to the Layoutable protocol which is fairly easy

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions