headroom.js icon indicating copy to clipboard operation
headroom.js copied to clipboard

Add beforePin and beforeUnpin actions

Open uhlenbrock opened this issue 10 years ago • 5 comments

Fixes #96.

uhlenbrock avatar Oct 28 '14 16:10 uhlenbrock

I'm still not sure about this. Don't want to complicate the API further with more callbacks, yet i can see the need/desire for this kind of functionality. I'll think it over this week (I plan on getting through as many issues/PRs as possible this week)

WickyNilliams avatar Jan 12 '15 18:01 WickyNilliams

I like the idea, but I would find it better with an event based implementation. Something that would allow you to prevent the default, which would be the pin/unpin effect.

lucasconstantino avatar May 04 '15 00:05 lucasconstantino

I'd love to see this merged as I too have a need for this functionality. In general I am also a fan of event-based approaches, but the callbacks get the job done just fine. :) If you were to switch to event-based it would be best to do that for all callbacks, which obviously would be a significant change, and thus one I recommend leaving until some future date (ie, go ahead and introduce the beforePin, beforeUnpin callbacks, and explore a possible events overhaul later).

EnigmaSolved avatar May 20 '15 15:05 EnigmaSolved

I also could use this and will have to find a workaround in the mean time.

zebapy avatar Mar 23 '20 15:03 zebapy

@WickyNilliams anything we can help with to get this in? I need this yet again on a different project now. It's been awhile, it might as well get merged then later handle the event emitter changes when those come around.

zebapy avatar Jul 31 '20 13:07 zebapy