Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Adding props for better content positioning #55

Merged
merged 1 commit into from
May 28, 2020

Conversation

Nberezhnoy
Copy link
Contributor

@Nberezhnoy Nberezhnoy commented May 8, 2020

Description of the Change

Adding the following props

  • useScrollHeight
  • useScrollWidth
  • heightOffset
  • widthOffset

Benefits

The useScrollHeight and useScrollWidth props allow you to change the logic for calculating content sizes to correctly position the menu.

The heightOffset and widthOffset props allow you to set arbitrary indent values from the edge of the screen.

Any additional information

In my case, the use of scrollHeight is required to correctly calculate the size of the context menu, provided that the initial size of the content is 0 pixels and will subsequently change using animation.

@rawilk
Copy link
Owner

rawilk commented May 27, 2020

Thanks for your contribution! I plan on merging this soon.

@rawilk rawilk merged commit e20e5ac into rawilk:master May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants