Skip to content

Concept of max width/height for custom measure function #160

@emilsjolander

Description

@emilsjolander

When implementing a custom measure function there is currently no way of knowing of the width and height passed in refer to an exact height and width or a maximum value. For example when centering a node with a custom measure function it will be passed the width and height of its parent as this is the maximum size it can be measured at. The node being measured does not have this information however and will have to make a guess.

I suggest we add something along the lines of android's concept of measurement modes (MeasureSpec). so that nodes being measured know whether they must measure to a size exactly, at most, or if the can just ignore it totally (this is currently encoded in the size by looking for NaN).

@lucasr @vjeux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions