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