Skip to content

Modify zIndex context behaviour and sorting #343

@wouterlucas

Description

@wouterlucas

Currently a zIndex is required and every parent/child has its own zIndex context. This has an impact on performance because a) sorting is always performed and b) this triggers a lot of parent/child updates that bubble creating more re-sorts.

With L2 not providing a zIndex would not created a sorted zIndex context, similar to CSS. Alternatively you could set forceZIndexContext to true to force it.

Suggestion is to:

  • When no zIndex is provided do not create a zIndex context, see if we can skip the sorting for that node. Just like L2
  • Create an explicit do not sort flag or autosort=false flag, so the app framework can turn off sorting all together including parent/child event bubbling
  • Expose a .sort() function on the node to manually trigger a sort once

Alternatively we can also strip out the zIndexing all together and have the app framework take care of providing children in the correct order. However this would be a big behavioral change over todays implementation, however it would severely reduce the amount of sorting/bubbling the renderer needs to do every time.

Feedback please: @erikhaandrikman @elsassph @michielvandergeest

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