isoflow/src/config.ts

30 lines
770 B
TypeScript
Raw Normal View History

2023-08-15 15:24:39 +00:00
import { Size, Coords } 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-15 15:24:39 +00:00
interface ConnectorDefaults {
width: number;
searchOffset: Coords;
}
export const CONNECTOR_DEFAULTS: ConnectorDefaults = {
width: 4,
// The boundaries of the search area for the pathfinder algorithm
// is the grid that encompasses the two nodes + the offset below.
searchOffset: { x: 3, y: 3 }
2023-07-27 13:51:18 +00:00
};
2023-07-21 20:29:55 +00:00
export const NODE_DEFAULTS = {
label: '',
2023-07-21 21:26:08 +00:00
labelHeight: 100,
color: DEFAULT_COLOR
2023-07-21 20:29:55 +00:00
};
export const ZOOM_INCREMENT = 0.2;
export const MIN_ZOOM = 0.2;
export const MAX_ZOOM = 1;