constants.js — react Source File
Architecture documentation for constants.js, a javascript file in the react codebase. 0 imports, 4 dependents.
Entity Profile
Dependency Diagram
graph LR f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d["constants.js"] 6a79b8db_8663_727d_cf8d_8ad55d807b11["index-test.internal.js"] 6a79b8db_8663_727d_cf8d_8ad55d807b11 --> f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d d4066e75_dcea_2912_73ff_88e30b9530d2["domEventSequences.js"] d4066e75_dcea_2912_73ff_88e30b9530d2 --> f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d fd9d5c95_e738_dee5_e510_e7b1e9e4ea39["domEvents.js"] fd9d5c95_e738_dee5_e510_e7b1e9e4ea39 --> f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d cfa588b4_57a7_0b0e_ec6d_2d8b58107071["index.js"] cfa588b4_57a7_0b0e_ec6d_2d8b58107071 --> f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d style f4316f6a_6bd2_2c45_d5ba_4eca3b37ec0d 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';
export const defaultPointerId = 1;
export const defaultPointerSize = 23;
export const defaultBrowserChromeSize = 50;
/**
* Button property
* This property only guarantees to indicate which buttons are pressed during events caused by pressing or
* releasing one or multiple buttons. As such, it is not reliable for events such as 'mouseenter', 'mouseleave',
* 'mouseover', 'mouseout' or 'mousemove'. Furthermore, the semantics differ for PointerEvent, where the value
* for 'pointermove' will always be -1.
*/
export const buttonType = {
// no change since last event
none: -1,
// left-mouse
// touch contact
// pen contact
primary: 0,
// right-mouse
// pen barrel button
secondary: 2,
// middle mouse
auxiliary: 1,
// back mouse
back: 3,
// forward mouse
forward: 4,
// pen eraser
eraser: 5,
};
/**
* Buttons bitmask
*/
export const buttonsType = {
none: 0,
// left-mouse
// touch contact
// pen contact
primary: 1,
// right-mouse
// pen barrel button
secondary: 2,
// middle mouse
auxiliary: 4,
// back mouse
back: 8,
// forward mouse
forward: 16,
// pen eraser
eraser: 32,
};
Domain
Imported By
Source
Frequently Asked Questions
What does constants.js do?
constants.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain.
What files import constants.js?
constants.js is imported by 4 file(s): domEventSequences.js, domEvents.js, index-test.internal.js, index.js.
Where is constants.js in the architecture?
constants.js is located at packages/dom-event-testing-library/constants.js (domain: BabelCompiler, 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