All files / src Constants.js

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1
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        1x                                                          
/**
 * Exporting some constants used in the files
 * return {object}
 */
module.exports = {
  // Left and right are used to control the direciton in which we want to translate our
  // timeline
  LEFT: 'left',
  RIGHT: 'right',
 
  // The keycodes of all the arrow keys (used for keyboard navigation)
  LEFT_KEY: 37,
  RIGHT_KEY: 39,
  UP_KEY: 38,
  DOWN_KEY: 40,
 
  // Milliseconds in a given day (required to set the minimum seperation on events)
  DAY: 86400000,
  // The maximum seperation between any two events (min: 1 and max: 6)
  // MAX_NORMALISED_SEPERATION * ${eventsMinDistance} is the value in pixles for max seperation
  MAX_NORMALISED_SEPERATION: 6,
  // Total length of the timeline in pixels
  MIN_TIMELINE_WIDTH: 750,
  // width of the area for text in the timeline
  DATE_WIDTH: 85,
 
  // which events to trigger based on the left or the right arrow key on the keyboard is pressed
  KEYMAP: {
    37: 'left',
    39: 'right'
  }
};