MCPcopy
hub / github.com/e-oj/Magic-Grid / observeContainerResize

Method observeContainerResize

src/index.js:231–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229 }
230
231 observeContainerResize() {
232 if (this.resizeObserver) return;
233
234 this.resizeObserver = new ResizeObserver(() => {
235 setTimeout(() => {
236 this.positionItems();
237 }, REPOSITIONING_DELAY);
238
239 });
240
241 this.resizeObserver.observe(this.container);
242 }
243
244 /**
245 * Positions all the items and

Callers 1

listenMethod · 0.95

Calls 1

positionItemsMethod · 0.95

Tested by

no test coverage detected