All files / src config.js

100% Statements 28/28
100% Branches 0/0
100% Functions 1/1
100% Lines 27/27

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139    5x 5x 5x 5x 5x 5x 5x 5x   5x                                                                                                                                                                 5x 5x 5x 5x                     45x 5x               5x 5x 5x 5x 5x 5x 5x 5x 5x           5x 5x             5x  
import theme from './assets/theme'
 
export const polygonCloseTolerance = 15
export const snapToPointTolerance = 15
export const snapToIntersectionPointTolerance = 15
export const snapToLineTolerance = 10
export const distanceToCloseNode = 70
export const mmTolerance = 5
export const mmTolerance3dNode = 50
export const earthRadius = 6371008
 
export const layerColors = {
  construction: {
    fillColor: 'transparent',
    strokeColor: theme.colors.blueElectric,
    strokeWidth: 3
  },
  roof: {
    fillColor: 'rgba(255, 255, 255, 0.1)',
    strokeColor: 'white',
    strokeWidth: 0
  },
  roofInside: {
    fillColor: 'rgba(255, 255, 255, 0.1)',
    strokeColor: 'white',
    strokeWidth: 1
  },
  obstacle: { fillColor: theme.colors.red, strokeColor: 'red', strokeWidth: 1 },
  panel: {
    fillColor: 'rgba(115, 115, 229, 0.1)',
    strokeColor: '#ffffff',
    strokeWidth: 1
  },
  user_deactivated_panel: {
    fillColor: 'rgba(115, 115, 229, 0.1)',
    strokeColor: 'white',
    strokeWidth: 4
  },
  selectedPanel: {
    fillColor: '#0068DE80',
    strokeColor: theme.colors.blue,
    strokeWidth: 1
  },
  snap: { fillColor: 'transparent', strokeColor: 'white' },
  moduleField: {
    fillColor: 'rgba(255, 255, 255, 0.1)',
    strokeColor: 'white',
    strokeWidth: 3
  },
  hoveredModuleFieldEdge: { strokeColor: theme.colors.blue, strokeWidth: 6 },
  tmpModuleField: {
    fillColor: 'rgba(115, 115, 229, 0.4)',
    strokeColor: theme.colors.blue,
    strokeWidth: 2
  },
  selectedModuleField: {
    fillColor: '#0068DE80',
    strokeColor: theme.colors.blue,
    strokeWidth: 3
  },
  highlight: {
    fillColor: 'rgba(255, 255, 255, 0.2)',
    strokeColor: 'white',
    strokeWidth: 1
  },
  selectedRoof: {
    fillColor: '#0068DE80',
    strokeColor: 'white',
    strokeWidth: 3
  },
  selectedObstacle: {
    fillColor: '#0068DE80',
    strokeColor: theme.colors.blue,
    strokeWidth: 2
  },
  selectedAndHighlighted: {
    fillColor: '#0068DEA0',
    strokeColor: theme.colors.blue,
    strokeWidth: 3
  },
  flatWarning: {
    fillColor: '#ffff0090',
    strokeColor: 'yellow',
    strokeWidth: 1
  },
  customLength: {
    fillColor: 'transparent',
    strokeColor: theme.colors.blueElectric,
    strokeWidth: 1
  }
}
 
export const baseEdgeOfModuleField = theme.colors.blueElectric
export const maximumGapLimit = 500
export const defaultBaseHeight = 3000
export const colorArrayBase = [
  '#FF5656',
  '#FDB813',
  '#505CA6',
  '#C84E4E',
  '#8392EE',
  '#6CD5D5',
  '#90A650',
  '#D27CCA',
  '#6276DF'
]
export const colorArray = colorArrayBase.map((c) => c + 'c0')
export const layerTools = {
  map: [],
  roof: ['drawRoof', 'selectRoof'],
  obstacle: ['drawObstacle'],
  margin: ['selectMargin'],
  panel: ['selectModuleField']
}
//3D visualisation:
export const beamRadius = 0.05
export const maxMargin = 2500
export const node3DRadius = 0.05
export const beamColor = '#ffffff'
export const node3DColor = 'white'
export const beamOpacity = 0.3
export const node3dOpacity = 0.3
export const dimMarginColor = '#ff000020'
export const hitOption = {
  segments: true,
  stroke: true,
  fill: true,
  tolerance: 10
}
export const zoomFactor = Math.exp(Math.log(2) / 10)
export const hitOptionPolygonStrict = {
  segments: false,
  stroke: false,
  fill: true,
  tolerance: 0
}
 
export const dragHeightSensitivity = 20