Home / Function/ layoutSubviews() — react Function Reference

layoutSubviews() — react Function Reference

Architecture documentation for the layoutSubviews() function in VerticalScrollView.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  21742aca_6c3f_da0b_7ed0_8cec93753d4d["layoutSubviews()"]
  15e8ee71_cd71_e6f6_40e5_59e8feb4985d["VerticalScrollView"]
  21742aca_6c3f_da0b_7ed0_8cec93753d4d -->|defined in| 15e8ee71_cd71_e6f6_40e5_59e8feb4985d
  b095d95a_14d3_4558_d65a_4c272b86428a["layoutSubviews()"]
  b095d95a_14d3_4558_d65a_4c272b86428a -->|calls| 21742aca_6c3f_da0b_7ed0_8cec93753d4d
  6bb2400d_04ee_af63_1d65_f8d70d7f4857["desiredSize()"]
  21742aca_6c3f_da0b_7ed0_8cec93753d4d -->|calls| 6bb2400d_04ee_af63_1d65_f8d70d7f4857
  8864ee69_ae94_6428_b216_4158f39d66c2["setFrame()"]
  21742aca_6c3f_da0b_7ed0_8cec93753d4d -->|calls| 8864ee69_ae94_6428_b216_4158f39d66c2
  style 21742aca_6c3f_da0b_7ed0_8cec93753d4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-timeline/src/view-base/VerticalScrollView.js lines 133–154

  layoutSubviews() {
    const {offset} = this._scrollState;
    const desiredSize = this._contentView.desiredSize();

    const minimumHeight = this.frame.size.height;
    const desiredHeight = desiredSize ? desiredSize.height : 0;
    // Force view to take up at least all remaining vertical space.
    const height = Math.max(desiredHeight, minimumHeight);

    const proposedFrame = {
      origin: {
        x: this.frame.origin.x,
        y: this.frame.origin.y + offset,
      },
      size: {
        width: this.frame.size.width,
        height,
      },
    };
    this._contentView.setFrame(proposedFrame);
    super.layoutSubviews();
  }

Domain

Subdomains

Called By

Frequently Asked Questions

What does layoutSubviews() do?
layoutSubviews() is a function in the react codebase, defined in packages/react-devtools-timeline/src/view-base/VerticalScrollView.js.
Where is layoutSubviews() defined?
layoutSubviews() is defined in packages/react-devtools-timeline/src/view-base/VerticalScrollView.js at line 133.
What does layoutSubviews() call?
layoutSubviews() calls 2 function(s): desiredSize, setFrame.
What calls layoutSubviews()?
layoutSubviews() is called by 1 function(s): layoutSubviews.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free