Home / Function/ handleInteraction() — react Function Reference

handleInteraction() — react Function Reference

Architecture documentation for the handleInteraction() function in Surface.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  a955e197_8406_3a9f_70b7_bd2bc137a188["handleInteraction()"]
  c369a97c_dd8c_2e92_cdce_84e8bb9a306d["Surface"]
  a955e197_8406_3a9f_70b7_bd2bc137a188 -->|defined in| c369a97c_dd8c_2e92_cdce_84e8bb9a306d
  6153f3f9_e7cd_ad34_9d0a_89b5424a4b64["handleInteraction()"]
  6153f3f9_e7cd_ad34_9d0a_89b5424a4b64 -->|calls| a955e197_8406_3a9f_70b7_bd2bc137a188
  eb1765a3_0863_dd2c_a927_6e4f28217907["handleInteraction()"]
  eb1765a3_0863_dd2c_a927_6e4f28217907 -->|calls| a955e197_8406_3a9f_70b7_bd2bc137a188
  561028c1_37ac_c290_dac9_6fb0e8601077["handleInteraction()"]
  561028c1_37ac_c290_dac9_6fb0e8601077 -->|calls| a955e197_8406_3a9f_70b7_bd2bc137a188
  78ba298b_e950_e359_1bc4_641a17c0f775["desiredSize()"]
  78ba298b_e950_e359_1bc4_641a17c0f775 -->|calls| a955e197_8406_3a9f_70b7_bd2bc137a188
  style a955e197_8406_3a9f_70b7_bd2bc137a188 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-timeline/src/view-base/Surface.js lines 121–153

  handleInteraction(interaction: Interaction) {
    const rootView = this.rootView;
    if (rootView != null) {
      const viewRefs = this._viewRefs;
      switch (interaction.type) {
        case 'mousemove':
        case 'wheel-control':
        case 'wheel-meta':
        case 'wheel-plain':
        case 'wheel-shift':
          // Clean out the hovered view before processing this type of interaction.
          const hoveredView = viewRefs.hoveredView;
          viewRefs.hoveredView = null;

          rootView.handleInteractionAndPropagateToSubviews(
            interaction,
            viewRefs,
          );

          // If a previously hovered view is no longer hovered, update the outer state.
          if (hoveredView !== null && viewRefs.hoveredView === null) {
            this._resetHoveredEvent();
          }
          break;
        default:
          rootView.handleInteractionAndPropagateToSubviews(
            interaction,
            viewRefs,
          );
          break;
      }
    }
  }

Domain

Subdomains

Frequently Asked Questions

What does handleInteraction() do?
handleInteraction() is a function in the react codebase, defined in packages/react-devtools-timeline/src/view-base/Surface.js.
Where is handleInteraction() defined?
handleInteraction() is defined in packages/react-devtools-timeline/src/view-base/Surface.js at line 121.
What calls handleInteraction()?
handleInteraction() is called by 4 function(s): desiredSize, handleInteraction, handleInteraction, handleInteraction.

Analyze Your Own Codebase

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

Try Supermodel Free