Home / File/ VerticalScrollView.js — react Source File

VerticalScrollView.js — react Source File

Architecture documentation for VerticalScrollView.js, a javascript file in the react codebase. 13 imports, 1 dependents.

File javascript BabelCompiler Validation 13 imports 1 dependents 1 functions 1 classes

Entity Profile

Dependency Diagram

graph LR
  be7fceed_f363_2288_8ab1_9e46ccc7de65["VerticalScrollView.js"]
  1d481b0c_03e1_6f28_eff1_74d4566b3dc8["geometry.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> 1d481b0c_03e1_6f28_eff1_74d4566b3dc8
  c31109e4_56cc_8bde_2f0a_c3a35a729719["useCanvasInteraction.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> c31109e4_56cc_8bde_2f0a_c3a35a729719
  d0e34df5_54e0_bd63_7394_3bfe61a4c376["scrollState.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> d0e34df5_54e0_bd63_7394_3bfe61a4c376
  2fbafaf8_32f6_4129_38fc_89470d906d24["Surface.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> 2fbafaf8_32f6_4129_38fc_89470d906d24
  20cc2065_4b5b_fd6b_be12_28f36b0ff4cf["types.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> 20cc2065_4b5b_fd6b_be12_28f36b0ff4cf
  c369a97c_dd8c_2e92_cdce_84e8bb9a306d["Surface"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> c369a97c_dd8c_2e92_cdce_84e8bb9a306d
  82f60adf_9325_5735_ba06_dcbbfcf32cc9["View.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> 82f60adf_9325_5735_ba06_dcbbfcf32cc9
  5cadbad4_62d2_f23e_1bf4_225db867ed8b["rectContainsPoint"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> 5cadbad4_62d2_f23e_1bf4_225db867ed8b
  f077803e_adfb_e522_43d4_7b720fa272fa["clampState"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> f077803e_adfb_e522_43d4_7b720fa272fa
  7d8994ae_c610_bfe7_54d3_0ee2e2bf3ec1["areScrollStatesEqual"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> 7d8994ae_c610_bfe7_54d3_0ee2e2bf3ec1
  94cfe42d_2d3d_5da3_cd07_23705b8b0ec6["translateState"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> 94cfe42d_2d3d_5da3_cd07_23705b8b0ec6
  d587018b_e3d9_bf04_a734_058fe7e6a39c["constants.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> d587018b_e3d9_bf04_a734_058fe7e6a39c
  eab2f8f4_2e4c_8e75_87d9_c7d9b524affb["constants.js"]
  be7fceed_f363_2288_8ab1_9e46ccc7de65 --> eab2f8f4_2e4c_8e75_87d9_c7d9b524affb
  9576b70a_cfcb_5729_1030_479df0856820["VerticalScrollOverflowView.js"]
  9576b70a_cfcb_5729_1030_479df0856820 --> be7fceed_f363_2288_8ab1_9e46ccc7de65
  style be7fceed_f363_2288_8ab1_9e46ccc7de65 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow
 */

import type {Size, IntrinsicSize, Rect} from './geometry';
import type {
  Interaction,
  MouseDownInteraction,
  MouseMoveInteraction,
  MouseUpInteraction,
  WheelWithShiftInteraction,
} from './useCanvasInteraction';
import type {ScrollState} from './utils/scrollState';
import type {ViewRefs} from './Surface';
import type {ViewState} from '../types';

import {Surface} from './Surface';
import {View} from './View';
import {rectContainsPoint} from './geometry';
import {
  clampState,
  areScrollStatesEqual,
  translateState,
} from './utils/scrollState';
import {MOVE_WHEEL_DELTA_THRESHOLD} from './constants';
import {COLORS} from '../content-views/constants';

const CARET_MARGIN = 3;
const CARET_WIDTH = 5;
const CARET_HEIGHT = 3;

type OnChangeCallback = (
  scrollState: ScrollState,
  containerLength: number,
) => void;

export class VerticalScrollView extends View {
  _contentView: View;
  _isPanning: boolean;
  _mutableViewStateKey: string;
  _onChangeCallback: OnChangeCallback | null;
  _scrollState: ScrollState;
  _viewState: ViewState;

  constructor(
    surface: Surface,
    frame: Rect,
    contentView: View,
    viewState: ViewState,
    label: string,
  ) {
    super(surface, frame);

    this._contentView = contentView;
    this._isPanning = false;
// ... (238 more lines)

Domain

Subdomains

Functions

Frequently Asked Questions

What does VerticalScrollView.js do?
VerticalScrollView.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What functions are defined in VerticalScrollView.js?
VerticalScrollView.js defines 1 function(s): OnChangeCallback.
What does VerticalScrollView.js depend on?
VerticalScrollView.js imports 13 module(s): Surface, Surface.js, View.js, areScrollStatesEqual, clampState, constants.js, constants.js, geometry.js, and 5 more.
What files import VerticalScrollView.js?
VerticalScrollView.js is imported by 1 file(s): VerticalScrollOverflowView.js.
Where is VerticalScrollView.js in the architecture?
VerticalScrollView.js is located at packages/react-devtools-timeline/src/view-base/VerticalScrollView.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-timeline/src/view-base).

Analyze Your Own Codebase

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

Try Supermodel Free