1 /*
  2  * © 2009 ROBO Design
  3  * http://www.robodesign.ro
  4  *
  5  * $Date: 2009-04-21 14:57:31 +0300 $
  6  */
  7 
  8 /**
  9  * @author <a lang="ro" href="http://www.robodesign.ro/mihai">Mihai Şucan</a>
 10  * @fileOverview Configuration file for the web application.
 11  */
 12 
 13 /**
 14  * @namespace Holds all the configuration for the paint application.
 15  */
 16 var PainterConfig = {
 17   /**
 18    * The default tool ID.
 19    *
 20    * @type String
 21    * @see PaintTools The object holding all the drawing tools.
 22    */
 23   tool_default: 'line',
 24 
 25   /**
 26    * The mouse keys movement acceleration.
 27    *
 28    * @type Number
 29    * @see PaintMouseKeys The MouseKeys extension.
 30    */
 31   mousekeys_accel: 0.1,
 32 
 33   /**
 34    * Keyboard shortcuts associated to drawing tools and other actions.
 35    *
 36    * @type Object
 37    * @see PaintTools The object holding all the drawing tools.
 38    */
 39   keys: {
 40     0: { action: 'mousekeys', param: 'Toggle' },
 41     1: { action: 'mousekeys', param: 'SouthWest' },
 42     2: { action: 'mousekeys', param: 'South' },
 43     3: { action: 'mousekeys', param: 'SouthEast' },
 44     4: { action: 'mousekeys', param: 'West' },
 45     6: { action: 'mousekeys', param: 'East' },
 46     7: { action: 'mousekeys', param: 'NorthWest' },
 47     8: { action: 'mousekeys', param: 'North' },
 48     9: { action: 'mousekeys', param: 'NorthEast' },
 49     L: { tool: 'line' },
 50     P: { tool: 'pencil' },
 51     R: { tool: 'rect' }
 52   }
 53 };
 54 
 55 // Make sure the number keys on the NumPad also work when the Shift key is down.
 56 lib.extend(PainterConfig.keys, {
 57   'Shift Insert':   PainterConfig.keys['0'],
 58   'Shift End':      PainterConfig.keys['1'],
 59   'Shift Down':     PainterConfig.keys['2'],
 60   'Shift PageDown': PainterConfig.keys['3'],
 61   'Shift Left':     PainterConfig.keys['4'],
 62   'Shift Right':    PainterConfig.keys['6'],
 63   'Shift Home':     PainterConfig.keys['7'],
 64   'Shift Up':       PainterConfig.keys['8'],
 65   'Shift PageUp':   PainterConfig.keys['9']
 66 });
 67 
 68 
 69 // vim:set spell spl=en fo=wan1croql tw=80 ts=2 sw=2 sts=2 sta et ai cin fenc=utf-8 ff=unix:
 70