bevacqua / dragula

:ok_hand: Drag and drop so simple it hurts
https://bevacqua.github.io/dragula/
MIT License
21.89k stars 1.97k forks source link

Change the location of gu-mirror elsewhere than body #514

Closed gregorfelkar closed 6 years ago

gregorfelkar commented 6 years ago

Hello,

I have an issue with gu-mirror location, by default it's placed as the last element in <body> element. But i have a situation where i have <div> container which is scaling it's content and my dragula dnd is located inside that scaled container. So if my container is scaled to 0.5 then when i grab an element to move it moves gu-mirror element which is not scaled because it's outside my container.

So my question is: Is there a way to specify the gu-mirror location?

Or will i have to hack something together, something like getting current scale from container and apply it to gu-mirror?

Thank you

mdudek commented 6 years ago

Yes it is, check options.mirrorContainer ...

gregorfelkar commented 6 years ago

Thank you, that worked.