MCPcopy
hub / github.com/d3/d3 / observed

Function observed

docs/components/PlotRender.js:152–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150 const mounted = (el) => {
151 disconnect(); // remove old listeners
152 function observed() {
153 unmounted(el); // remove old plot (and listeners)
154 el.append(Plot[method](options));
155 }
156 const rect = el.getBoundingClientRect();
157 if (rect.bottom > 0 && rect.top < window.innerHeight) {
158 observed();

Callers 1

mountedFunction · 0.85

Calls 1

unmountedFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…