Add ability to specify where the menu is appended #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the context menu DOM element (#cy-context-menus-cxt-menu) is
appended to the document's body element.
When the menu is positioned at the time of the user's click, the "left"
and "right" positions are calculated based on the rendered graph's
container's location plus the cilck position within the graph.
If the graph was rendered in a container which was moved away from the
normal flow position in the body (such as for the purpose of containing
it in a "slide- in" animation), then the calculated position for the
context menu might not be correct based on the current positioning of
elements in the browser.
To accommodate this, add an option that allows for supplying a CSS
selector that the #cy-context-menus-cxt-menu element should be appended
to instead of the body.