Skip to content
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

Add info to window drag source to enable dragging out of the layout #144

Open
chrisdalke opened this issue Jun 3, 2020 · 0 comments
Open

Comments

@chrisdalke
Copy link

Hello, this is a follow-up to #142 where I talked about dragging into the mosaic layout.

I'd like to also be able to drag the mosaic window out of the layout, into an external drag source. Some background: I have a tabbed application which uses react-mosaic to allow dragging of windows and other tabs into combined layouts. I'd also like to be able to drag a window back out of the layout to split it into its own tab.

In order to do this, two changes would be needed:

  1. the drag source would need to return a drag item that contains the layout path and mosaic key for that window. Right now it seems to only have data used internally:
{
    mosaicId: ...,
    hideTimer: ...
}

Having those fields on the drag item would allow an external drag source to perform some action when the window is dragged out of the layout.

  1. The drag target should be able to return an object with the format { remove: true }, which will tell the window drag source to update the tree with a remove update instead of a drag update.
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

1 participant