TimeAxisMarkersView.js — react Source File
Architecture documentation for TimeAxisMarkersView.js, a javascript file in the react codebase. 7 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 349c9f88_b0e3_7db5_ca62_e5f635fd40f2["TimeAxisMarkersView.js"] bbc225e1_d450_ae58_6679_9240ebe54628["index.js"] 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 --> bbc225e1_d450_ae58_6679_9240ebe54628 e39a99ae_faf3_afd9_4fc8_fa9a6210f1d3["positioning.js"] 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 --> e39a99ae_faf3_afd9_4fc8_fa9a6210f1d3 6743acc7_a552_31bd_d8df_67b4ec27ba6d["durationToWidth"] 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 --> 6743acc7_a552_31bd_d8df_67b4ec27ba6d 6fe722ba_3051_6ecf_abe3_62a190c3ad25["positioningScaleFactor"] 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 --> 6fe722ba_3051_6ecf_abe3_62a190c3ad25 a1e0fb75_d73e_2a52_2e38_23e1f70979f8["positionToTimestamp"] 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 --> a1e0fb75_d73e_2a52_2e38_23e1f70979f8 83465e3e_5308_9ddc_a12b_a84d78f1c10a["timestampToPosition"] 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 --> 83465e3e_5308_9ddc_a12b_a84d78f1c10a eab2f8f4_2e4c_8e75_87d9_c7d9b524affb["constants.js"] 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 --> eab2f8f4_2e4c_8e75_87d9_c7d9b524affb style 349c9f88_b0e3_7db5_ca62_e5f635fd40f2 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 {Rect, Size} from '../view-base';
import {
durationToWidth,
positioningScaleFactor,
positionToTimestamp,
timestampToPosition,
} from './utils/positioning';
import {
View,
Surface,
rectIntersectsRect,
intersectionOfRects,
} from '../view-base';
import {
COLORS,
INTERVAL_TIMES,
LABEL_SIZE,
FONT_SIZE,
MARKER_HEIGHT,
MARKER_TEXT_PADDING,
MARKER_TICK_HEIGHT,
MIN_INTERVAL_SIZE_PX,
BORDER_SIZE,
} from './constants';
const HEADER_HEIGHT_FIXED = MARKER_HEIGHT + BORDER_SIZE;
const LABEL_FIXED_WIDTH = LABEL_SIZE + BORDER_SIZE;
export class TimeAxisMarkersView extends View {
_totalDuration: number;
_intrinsicSize: Size;
constructor(surface: Surface, frame: Rect, totalDuration: number) {
super(surface, frame);
this._totalDuration = totalDuration;
this._intrinsicSize = {
width: this._totalDuration,
height: HEADER_HEIGHT_FIXED,
};
}
desiredSize(): Size {
return this._intrinsicSize;
}
// Time mark intervals vary based on the current zoom range and the time it represents.
// In Chrome, these seem to range from 70-140 pixels wide.
// Time wise, they represent intervals of e.g. 1s, 500ms, 200ms, 100ms, 50ms, 20ms.
// Based on zoom, we should determine which amount to actually show.
_getTimeTickInterval(scaleFactor: number): number {
// ... (104 more lines)
Domain
Subdomains
Classes
Dependencies
Source
Frequently Asked Questions
What does TimeAxisMarkersView.js do?
TimeAxisMarkersView.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Validation subdomain.
What does TimeAxisMarkersView.js depend on?
TimeAxisMarkersView.js imports 7 module(s): constants.js, durationToWidth, index.js, positionToTimestamp, positioning.js, positioningScaleFactor, timestampToPosition.
Where is TimeAxisMarkersView.js in the architecture?
TimeAxisMarkersView.js is located at packages/react-devtools-timeline/src/content-views/TimeAxisMarkersView.js (domain: BabelCompiler, subdomain: Validation, directory: packages/react-devtools-timeline/src/content-views).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free