microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
logo

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

source/npm/qsharp/ux/circuit-vis/constants.ts

49lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT license.
3
4// SVG Namespace
5export const svgNS = "http://www.w3.org/2000/svg";
6
7// Display attributes
8/** Left padding of SVG. */
9export const leftPadding = 20;
10/** x coordinate for first operation on each register. */
11export const startX = 80;
12/** y coordinate of the top of the first register row. */
13export const startY = 40;
14/** Minimum width of each gate. */
15export const minGateWidth = 40;
16/** Height of each gate. */
17export const gateHeight = 40;
18/** Padding on each side of gate. */
19export const gatePadding = 6;
20/** Default font size for gate labels. */
21export const labelFontSize = 14;
22/** Horizontal padding on each side of gate label. */
23export const labelPaddingX = 10;
24/** Height between classical registers. */
25export const classicalRegHeight = 20;
26/** Horizontal padding inside group box. */
27export const groupPaddingX = 10;
28/** Vertical padding above and below a group label. */
29export const groupLabelPaddingY = 2;
30/** Bottom padding inside group box. */
31export const groupBottomPadding = 10;
32/** Top padding inside group box. */
33export const groupTopPadding =
34 groupBottomPadding + labelFontSize + groupLabelPaddingY;
35/** Additional offset for control button. */
36export const controlBtnOffset = 40;
37/** Control button radius. */
38export const controlBtnRadius = 15;
39/** Default font size for gate arguments. */
40export const argsFontSize = 12;
41/** Starting x coord for each register wire. */
42export const regLineStart = 40;
43
44// Toolbox
45/** Toolbox minimum height */
46export const minToolboxHeight = 150;
47/** Gap between gates in Toolbox Panel */
48export const horizontalGap = 10;
49export const verticalGap = 10;
50