Home / Function/ _handleMouseMove() — react Function Reference

_handleMouseMove() — react Function Reference

Architecture documentation for the _handleMouseMove() function in ResizeBarView.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  686db2c1_9d87_c8ba_dd6a_45815f4456ca["_handleMouseMove()"]
  bc0823a6_6e22_c24e_dcae_a58df082924b["ResizeBarView"]
  686db2c1_9d87_c8ba_dd6a_45815f4456ca -->|defined in| bc0823a6_6e22_c24e_dcae_a58df082924b
  561028c1_37ac_c290_dac9_6fb0e8601077["handleInteraction()"]
  561028c1_37ac_c290_dac9_6fb0e8601077 -->|calls| 686db2c1_9d87_c8ba_dd6a_45815f4456ca
  e90ae4ef_4b8c_a5e3_ed50_d72e350e604b["_setInteractionState()"]
  686db2c1_9d87_c8ba_dd6a_45815f4456ca -->|calls| e90ae4ef_4b8c_a5e3_ed50_d72e350e604b
  5cadbad4_62d2_f23e_1bf4_225db867ed8b["rectContainsPoint()"]
  686db2c1_9d87_c8ba_dd6a_45815f4456ca -->|calls| 5cadbad4_62d2_f23e_1bf4_225db867ed8b
  style 686db2c1_9d87_c8ba_dd6a_45815f4456ca fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-timeline/src/view-base/resizable/ResizeBarView.js lines 138–164

  _handleMouseMove(interaction: MouseMoveInteraction, viewRefs: ViewRefs) {
    const cursorInView = rectContainsPoint(
      interaction.payload.location,
      this.frame,
    );

    if (viewRefs.activeView === this) {
      // If we're actively dragging this resize bar,
      // show the cursor even if the pointer isn't hovering over this view.
      this.currentCursor = 'ns-resize';
    } else if (cursorInView) {
      if (this.showLabel) {
        this.currentCursor = 'pointer';
      } else {
        this.currentCursor = 'ns-resize';
      }
    }

    if (cursorInView) {
      viewRefs.hoveredView = this;
    }

    if (this._interactionState === 'dragging') {
      return;
    }
    this._setInteractionState(cursorInView ? 'hovered' : 'normal');
  }

Domain

Subdomains

Frequently Asked Questions

What does _handleMouseMove() do?
_handleMouseMove() is a function in the react codebase, defined in packages/react-devtools-timeline/src/view-base/resizable/ResizeBarView.js.
Where is _handleMouseMove() defined?
_handleMouseMove() is defined in packages/react-devtools-timeline/src/view-base/resizable/ResizeBarView.js at line 138.
What does _handleMouseMove() call?
_handleMouseMove() calls 2 function(s): _setInteractionState, rectContainsPoint.
What calls _handleMouseMove()?
_handleMouseMove() is called by 1 function(s): handleInteraction.

Analyze Your Own Codebase

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

Try Supermodel Free