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

Set root $el as mirror container (instead of document.body) #54

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

johfer-bd
Copy link
Contributor

Hi,

this PR uses the kanban-board itself as container for the mirrored cards. By default, dragula uses document.body (which is sensible because it requires no knowledge about the DOM structure) but Vue gives us access to the DOM element that the component is mounted on, via $el. The benefit of using $el is that the original blocks/cards and the mirrored blocks/cards are closer to each other in the DOM and CSS rules are more likely to work for originals and mirrors alike (whereas all nested CSS rules for the original cards will fail for the mirrors when attached to document.body). This makes it much easier to style the mirrors in a similar/same way as the originals, with one set of CSS rules.

@johfer-bd
Copy link
Contributor Author

New PR #54: original PR #53 came from wrong branch and included conflicting package.json. Should be fixed in this PR.

Copy link
Owner

@BrockReece BrockReece left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for that

@BrockReece BrockReece merged commit 562b4a1 into BrockReece:master Jul 27, 2020
@BrockReece
Copy link
Owner

This has been released in v1.8.0
Thanks again

@johfer-bd
Copy link
Contributor Author

Great, thanks!

Johannes

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 this pull request may close these issues.

None yet

2 participants