Mallander / playlist-enhancer

Enhanced Playlist curation
MIT License
4 stars 2 forks source link

modified drag behavior to fix module compatibility issues #13

Closed CDeenen closed 2 years ago

CDeenen commented 3 years ago

Due to the way Playlist Enhancer handles the dragging of sounds from one playlist to another, it is incompatible with other modules that add drag functionality to sounds, such as Soundscape (see https://github.com/CDeenen/Soundscape/issues/11).

I've made some changes that fix this incompatibility. Instead of relying on the 'draggedSound' variable, whenever a sound is dragged, it transmits the sound's ID to the element it's dropped onto, which is then used to copy that sound into the playlist. Soundscape overwrites ondrag of the sound element that is added by Playlist Enhancer, but because it also transmits the sound's ID, this works out fine, allowing both modules to function like they should.