selection.dispatch()

selection.dispatch(type[, parameters])

Dispatches a custom event of the specified type to each selected element, in order. An optional parameters map may be specified to set additional properties of the event. It may contain the following fields:

  • bubbles - if true, the event is dispatched to ancestors in reverse tree order.
  • cancelable - if true, event.preventDefault is allowed.
  • detail - any custom data associated with the event.

If parameters is a function, it is evaluated for each selected element, in order, being passed the current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element. It must return the parameters map for the current element.

doc_D3_Js
2016-11-24 10:28:53
Comments
Leave a Comment

Please login to continue.