Skip to content

[core] limitShift: add option to pass an offset amount that is always added to the min/max values #1870

@ciampo

Description

@ciampo

Currently, the limitShift function considers two types of "offsets" when computing the min/max limits for the shift middleware:

  • the offset from the offset middleware (added
  • the offset from the offset option (part of the limitShift arguments)

Both of these offsets are added arbitrarily, following a logic that depends on the axis and the popover's placement.

This logic comes as a limitation when the consumer of the library needs to add an offset to the popover that is always applied. In that case.

That's why I'm proposing that we add a new option for the limitShift function, in order to be able to pass an offset amount that gets always added when computing the min/max limits — not sure what the best name for this option would be.

For more context, see the conversation in #1868

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis would be nice to have.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions