Skip to content

Prevent dragging legend out of plot div? #2940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brian428 opened this issue Aug 22, 2018 · 3 comments
Closed

Prevent dragging legend out of plot div? #2940

brian428 opened this issue Aug 22, 2018 · 3 comments

Comments

@brian428
Copy link

Currently, if a plot is editable and set to a constrained size, it's possible to drag the legend out of the plot div and permanently "lose" it. It would be nice if the drag behavior was changed to prevent this, or to provide a config option to turn on constraints on dragging the legend (or anything, really) out of the plot div.

@alexcjohnson
Copy link
Collaborator

Can you demonstrate in a codepen? I can't figure out how to reproduce the effect you're describing. By default the margins expand to fit wherever you drag it, but if I turn that off (margin.autoexpand: false) it always seems to jump back onto the plot when I let go of it.
legend-off-edge

@alexcjohnson
Copy link
Collaborator

@brian428 we still have not been able to reproduce this. Can I close it or do you have a demonstration of the issue?

@alexcjohnson
Copy link
Collaborator

Closing due to lack of activity. Feel free to reopen if anyone can reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants