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

I can Use DnD (inline) to move a block around in a page (line for droppoint and no shadow like tiles?) #65

Closed
Tracked by #4
djay opened this issue Jun 24, 2024 · 2 comments · Fixed by #123
Closed
Tracked by #4
Assignees

Comments

@djay
Copy link
Member

djay commented Jun 24, 2024

No description provided.

@djay
Copy link
Member Author

djay commented Aug 7, 2024

Similar to mosaic

  • Line shows between which two blocks it will appear
  • nothing removed when you start dragging
  • shadow is just a copy of the block thats made transparent

Image

https://www.youtube.com/watch?v=e6IAAGtdtcc

@djay
Copy link
Member Author

djay commented Aug 13, 2024

@MAX-786 not sure if this is helpful but this is the code that implimented the DND in mosaic as shown in the video.
https://github.com/plone/plone.app.mosaic/blob/b6a9540189f105637ec551a96e741e850393cffa/resources/js/mosaic.layout.js#L1018

It is more complex than what you need since mosaic didn't use containers but had side-by-side layout built in. That means they had to handle dropping on all sides of a block where you only have to handle above and below another block.

There are also likely simple libraries you can use that make this easier than following that code. but just in case it's useful.

@MAX-786 MAX-786 mentioned this issue Aug 13, 2024
4 tasks
@MAX-786 MAX-786 self-assigned this Aug 13, 2024
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

Successfully merging a pull request may close this issue.

2 participants