mousedown event on list item

Hi,
My main goal is to make a drag-and-resize button into a list item. (then get a value of the resizement to update an item attribute)

For that I think I need to put a resizer (HTML element) into each list item that will handle the mouse events (mousedown, mousemove and mouseup).

But I don’t succeed to do that.

What I tried :

  • Inserting resizer element into list template or list templateEnd. But as theses methods return an HTML string i can’t attach events

  • Using ItemRender list event, but the item is not yet rendered when this method is called, so i can’t attach events

  • ActiveContent: Didn’t find a way to attach events other than “click” on a active content element (I need mousedown, mousemove and mouseup)

  • Searching for a mousedown event on the list item itself

Did I miss something ? There is a way to attach mousedown event on a list item or html element inside list item ?

Thanks for your help

Hi,

Do you want to add a button ? Possibly you can use DataTable and its resizable rows:

http://docs.webix.com/datatable__sizing.html#resizing

http://docs.webix.com/samples/15_datatable/07_resize/03_all_resize.html

You can create a DataTable with a hidden header and one column.