MCPcopy Index your code
hub / github.com/plotly/plotly.js / d3eventDispatch

Function d3eventDispatch

src/plots/geo/zoom.js:468–501  ·  view source on GitHub ↗
(target)

Source from the content-addressed store, hash-verified

466// the svg:g element containing the brush) and the standard arguments `d` (the
467// target element's data) and `i` (the selection index of the target element).
468function d3eventDispatch(target) {
469 var i = 0;
470 var n = arguments.length;
471 var argumentz = [];
472
473 while(++i < n) argumentz.push(arguments[i]);
474
475 var dispatch = d3.dispatch.apply(null, argumentz);
476
477 // Creates a dispatch context for the specified `thiz` (typically, the target
478 // DOM element that received the source event) and `argumentz` (typically, the
479 // data `d` and index `i` of the target element). The returned function can be
480 // used to dispatch an event to any registered listeners; the function takes a
481 // single argument as input, being the event to dispatch. The event must have
482 // a "type" attribute which corresponds to a type registered in the
483 // constructor. This context will automatically populate the "sourceEvent" and
484 // "target" attributes of the event, as well as setting the `d3.event` global
485 // for the duration of the notification.
486 dispatch.of = function(thiz, argumentz) {
487 return function(e1) {
488 var e0;
489 try {
490 e0 = e1.sourceEvent = d3.event;
491 e1.target = target;
492 d3.event = e1;
493 dispatch[e1.type].apply(thiz, argumentz);
494 } finally {
495 d3.event = e0;
496 }
497 };
498 };
499
500 return dispatch;
501}

Callers 1

zoomClippedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…