desandro / draggabilly

:point_down: Make that shiz draggable
https://draggabilly.desandro.com
MIT License
3.86k stars 386 forks source link

Fix #131 #132

Closed Densaugeo closed 6 years ago

Densaugeo commented 8 years ago

Making _getPositionCoord return a dummy zero when there is no parent element (i.e. draggable element hasn't been attached tot he DOM tree yet) suppresses the error from #131.

The test system seems to be behaving a little oddly on my setup, but this change behaved identically to the master branch aside from #131, so I think it's good.

desandro commented 6 years ago

Thanks for this contribution. I have decided to pass on this code. I hope you continue to contribute to open-source projects!