MCPcopy Index your code
hub / github.com/microsoft/SandDance / componentDidMount

Method componentDidMount

docs/app/js/sanddance-app.js:370–385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

368 }
369 }
370 componentDidMount() {
371 const size = (0, _sanddanceReact.SandDance).VegaDeckGl.util.outerSize(this.div);
372 const over = {
373 left: Math.max(0, this.state.left + size.width - this.props.container.offsetWidth),
374 top: Math.max(0, this.state.top + size.height - this.props.container.offsetHeight)
375 };
376 if (over.left || over.top) {
377 let { left , top } = this.state;
378 left -= over.left;
379 top -= over.top;
380 this.setState({
381 left,
382 top
383 });
384 } else this.focus();
385 }
386 componentDidUpdate() {
387 this.focus();
388 }

Callers

nothing calls this directly

Calls 2

focusMethod · 0.95
maxMethod · 0.45

Tested by

no test coverage detected