MCPcopy
hub / github.com/rikschennink/fitty / onWindowResized

Function onWindowResized

src/fitty.js:290–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

288 // handles viewport changes, redraws all fitties, but only does so after a timeout
289 let resizeDebounce = null;
290 const onWindowResized = () => {
291 w.clearTimeout(resizeDebounce);
292 resizeDebounce = w.setTimeout(redrawAll(DrawState.DIRTY_LAYOUT), fitty.observeWindowDelay);
293 };
294
295 // define observe window property, so when we set it to true or false events are automatically added and removed
296 const events = ['resize', 'orientationchange'];

Callers

nothing calls this directly

Calls 1

redrawAllFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…