captbaritone / webamp

Winamp 2 reimplemented for the browser
https://webamp.org
MIT License
10.01k stars 662 forks source link

How to contain dragging of webamp to a specific div? #1128

Open web3builders opened 2 years ago

web3builders commented 2 years ago

Hello,

Trying to contain dragging of #webamp to a specific div on my website, but can't figure it out. The div in question is not its direct parent if that helps.

Ideas?

captbaritone commented 2 years ago

There's not currently a way to do this. Webamp has a bunch of logic around constraining itself to the window and it's relatively hard coded to that. Supporting constraining itself to a different div has a number of challenges when you consider that the div might change size/position at any point, including while you are dragging windows.

Could you share more about what you're trying to achieve?

In some cases, for example, an <iframe /> might be able to give this behavior.