MCPcopy Create free account
hub / github.com/OpenIntroStat/ims / resizeHandler

Function resizeHandler

libs/htmlwidgets-1.5.3/htmlwidgets.js:597–608  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

595 h: sizeObj ? sizeObj.getHeight() : el.offsetHeight
596 };
597 var resizeHandler = function(e) {
598 var size = {
599 w: sizeObj ? sizeObj.getWidth() : el.offsetWidth,
600 h: sizeObj ? sizeObj.getHeight() : el.offsetHeight
601 };
602 if (size.w === 0 && size.h === 0)
603 return;
604 if (size.w === lastSize.w && size.h === lastSize.h)
605 return;
606 lastSize = size;
607 binding.resize(el, size.w, size.h, initResult);
608 };
609
610 on(window, "resize", resizeHandler);
611

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected