MCPcopy Create free account
hub / github.com/microsoft/SandDance / SVGHandler

Function SVGHandler

docs/app/js/sanddance-app.js:123836–123845  ·  view source on GitHub ↗
(loader, tooltip)

Source from the content-addressed store, hash-verified

123834 }
123835});
123836function SVGHandler(loader, tooltip) {
123837 Handler.call(this, loader, tooltip);
123838 const h24 = this;
123839 h24._hrefHandler = listener(h24, (evt, item)=>{
123840 if (item && item.href) h24.handleHref(evt, item, item.href);
123841 });
123842 h24._tooltipHandler = listener(h24, (evt, item)=>{
123843 h24.handleTooltip(evt, item, evt.type !== TooltipHideEvent);
123844 });
123845} // wrap an event listener for the SVG DOM
123846const listener = (context51, handler)=>(evt)=>{
123847 let item = evt.target.__data__;
123848 item = Array.isArray(item) ? item[0] : item;

Callers

nothing calls this directly

Calls 1

listenerFunction · 0.70

Tested by

no test coverage detected