isoflow/src/config.ts

52 lines
1.1 KiB
TypeScript
Raw Normal View History

2023-08-18 17:07:02 +00:00
import {
Size,
Coords,
SceneInput,
Connector,
ConnectorStyleEnum
} from 'src/types';
import { customVars } from './styles/theme';
2023-07-21 21:26:08 +00:00
export const UNPROJECTED_TILE_SIZE = 100;
export const TILE_PROJECTION_MULTIPLIERS: Size = {
width: 1.415,
height: 0.819
};
export const DEFAULT_COLOR = customVars.diagramPalette.blue;
2023-08-31 11:02:17 +00:00
export const DEFAULT_FONT_FAMILY = 'Roboto, Arial, sans-serif';
export const NODE_DEFAULTS = {
label: '',
labelHeight: 140,
color: DEFAULT_COLOR
};
2023-08-15 15:24:39 +00:00
2023-08-18 17:07:02 +00:00
interface ConnectorDefaults {
width: number;
searchOffset: Coords;
style: Connector['style'];
}
2023-08-15 15:24:39 +00:00
export const CONNECTOR_DEFAULTS: ConnectorDefaults = {
2023-08-20 10:41:04 +00:00
width: 10,
2023-08-15 15:24:39 +00:00
// The boundaries of the search area for the pathfinder algorithm
// is the grid that encompasses the two nodes + the offset below.
2023-08-31 11:02:17 +00:00
searchOffset: { x: 1, y: 1 },
2023-08-18 17:07:02 +00:00
style: ConnectorStyleEnum.SOLID
2023-07-27 13:51:18 +00:00
};
2023-08-31 11:02:17 +00:00
export const TEXTBOX_DEFAULTS = {
fontSize: 0.6,
text: 'Text'
};
export const ZOOM_INCREMENT = 0.2;
export const MIN_ZOOM = 0.2;
export const MAX_ZOOM = 1;
export const EMPTY_SCENE: SceneInput = {
icons: [],
nodes: [],
connectors: [],
textBoxes: [],
rectangles: []
};