googlearchive / core-splitter

A split bar and dragging on it will resize the sibling element
10 stars 12 forks source link

onDrag event #16

Open jackd opened 9 years ago

jackd commented 9 years ago

Is there an elegant way to listen for a drag event (or a neighbouring element's resize event caused by a splitter movement)? I'm currently using a very inefficient workaround, but it makes me feel dirty knowing it's there...

frankiefu commented 9 years ago

You can use track event for dragging. Here is a jsbin: http://jsbin.com/pototenowo/1/edit?html,console,output

jackd commented 9 years ago

Thanks, works beautifully. Are the supported event listeners documented somewhere? I thought I had a good look around but couldn't find much... and I hate wasting other people's time. Teach a man to fish etc.