Home / File/ domEventSequences.js — react Source File

domEventSequences.js — react Source File

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

File javascript BabelCompiler Entrypoint 5 imports 1 dependents 12 functions

Entity Profile

Dependency Diagram

graph LR
  d4066e75_dcea_2912_73ff_88e30b9530d2["domEventSequences.js"]
  f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d["constants.js"]
  d4066e75_dcea_2912_73ff_88e30b9530d2 --> f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d
  fd9d5c95_e738_dee5_e510_e7b1e9e4ea39["domEvents.js"]
  d4066e75_dcea_2912_73ff_88e30b9530d2 --> fd9d5c95_e738_dee5_e510_e7b1e9e4ea39
  c03693b0_2482_9a7d_a058_7ba891e5839d["domEnvironment.js"]
  d4066e75_dcea_2912_73ff_88e30b9530d2 --> c03693b0_2482_9a7d_a058_7ba891e5839d
  010da236_784b_cbe9_c79d_2a93e35a2880["hasPointerEvent"]
  d4066e75_dcea_2912_73ff_88e30b9530d2 --> 010da236_784b_cbe9_c79d_2a93e35a2880
  56f57e4a_fc42_037d_ee3b_9463227d15f3["touchStore.js"]
  d4066e75_dcea_2912_73ff_88e30b9530d2 --> 56f57e4a_fc42_037d_ee3b_9463227d15f3
  cfa588b4_57a7_0b0e_ec6d_2d8b58107071["index.js"]
  cfa588b4_57a7_0b0e_ec6d_2d8b58107071 --> d4066e75_dcea_2912_73ff_88e30b9530d2
  style d4066e75_dcea_2912_73ff_88e30b9530d2 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.
 *
 * @emails react-core
 */

'use strict';

import {
  buttonType,
  buttonsType,
  defaultPointerId,
  defaultPointerSize,
  defaultBrowserChromeSize,
} from './constants';
import * as domEvents from './domEvents';
import {hasPointerEvent, platform} from './domEnvironment';
import * as touchStore from './touchStore';

/**
 * Converts a PointerEvent payload to a Touch
 */
function createTouch(target, payload) {
  const {
    height = defaultPointerSize,
    pageX,
    pageY,
    pointerId,
    pressure = 1,
    twist = 0,
    width = defaultPointerSize,
    x = 0,
    y = 0,
  } = payload;

  return {
    clientX: x,
    clientY: y,
    force: pressure,
    identifier: pointerId,
    pageX: pageX || x,
    pageY: pageY || y,
    radiusX: width / 2,
    radiusY: height / 2,
    rotationAngle: twist,
    target,
    screenX: x,
    screenY: y + defaultBrowserChromeSize,
  };
}

/**
 * Converts a PointerEvent to a TouchEvent
 */
function createTouchEventPayload(target, touch, payload) {
  const {
    altKey = false,
// ... (302 more lines)

Domain

Subdomains

Frequently Asked Questions

What does domEventSequences.js do?
domEventSequences.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Entrypoint subdomain.
What functions are defined in domEventSequences.js?
domEventSequences.js defines 12 function(s): contextmenu, createTouch, createTouchEventPayload, getPointerType, pointercancel, pointerdown, pointerenter, pointerexit, pointerhover, pointermove, and 2 more.
What does domEventSequences.js depend on?
domEventSequences.js imports 5 module(s): constants.js, domEnvironment.js, domEvents.js, hasPointerEvent, touchStore.js.
What files import domEventSequences.js?
domEventSequences.js is imported by 1 file(s): index.js.
Where is domEventSequences.js in the architecture?
domEventSequences.js is located at packages/dom-event-testing-library/domEventSequences.js (domain: BabelCompiler, subdomain: Entrypoint, directory: packages/dom-event-testing-library).

Analyze Your Own Codebase

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

Try Supermodel Free