| // Copyright 2019 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| export const PortPadding = 4; |
| export const InputPortRadius = 10; |
| export const AudioParamRadius = 5; |
| export const LeftMarginOfText = 12; |
| export const RightMarginOfText = 30; |
| export const LeftSideTopPadding = 5; |
| export const BottomPaddingWithoutParam = 6; |
| export const BottomPaddingWithParam = 8; |
| export const ArrowHeadSize = 12; |
| |
| export const GraphPadding = 20; |
| export const GraphMargin = 20; |
| |
| export const TotalInputPortHeight = InputPortRadius * 2 + PortPadding; |
| export const TotalOutputPortHeight = TotalInputPortHeight; |
| export const TotalParamPortHeight = AudioParamRadius * 2 + PortPadding; |
| |
| export const NodeLabelFontStyle = '14px Segoe UI, Arial'; |
| export const ParamLabelFontStyle = '12px Segoe UI, Arial'; |
| |
| export const GraphStyles = { |
| PortPadding, |
| InputPortRadius, |
| AudioParamRadius, |
| LeftMarginOfText, |
| RightMarginOfText, |
| LeftSideTopPadding, |
| BottomPaddingWithoutParam, |
| BottomPaddingWithParam, |
| ArrowHeadSize, |
| |
| // GraphPadding is used to add extra space for the layouted graph. |
| GraphPadding, |
| GraphMargin, |
| |
| TotalInputPortHeight, |
| TotalOutputPortHeight, |
| TotalParamPortHeight, |
| |
| NodeLabelFontStyle, |
| ParamLabelFontStyle |
| }; |
| |
| /* Legacy exported object */ |
| self.WebAudio = self.WebAudio || {}; |
| |
| /* Legacy exported object */ |
| WebAudio = WebAudio || {}; |
| |
| /* Legacy exported object */ |
| WebAudio.GraphVisualizer = WebAudio.GraphVisualizer || {}; |
| |
| WebAudio.GraphVisualizer.GraphStyles = GraphStyles; |