| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var RowAlignment = { | 5 var RowAlignment = { |
| 6 STRETCH: "stretch", | 6 STRETCH: "stretch", |
| 7 LEFT: "left", | 7 LEFT: "left", |
| 8 RIGHT: "right", | 8 RIGHT: "right", |
| 9 CENTER: "center", | 9 CENTER: "center", |
| 10 } | 10 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 */ | 52 */ |
| 53 var DEFAULT_KEY_WEIGHT_X = 100; | 53 var DEFAULT_KEY_WEIGHT_X = 100; |
| 54 | 54 |
| 55 /** | 55 /** |
| 56 * The default weight of a key in the Y direction. | 56 * The default weight of a key in the Y direction. |
| 57 * @type {number} | 57 * @type {number} |
| 58 */ | 58 */ |
| 59 var DEFAULT_KEY_WEIGHT_Y = 70; | 59 var DEFAULT_KEY_WEIGHT_Y = 70; |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * The default volume for keyboard sounds. |
| 63 * @type {number} |
| 64 */ |
| 65 var DEFAULT_VOLUME = 0.2; |
| 66 |
| 67 /** |
| 62 * The top padding on each key. | 68 * The top padding on each key. |
| 63 * @type {number} | 69 * @type {number} |
| 64 */ | 70 */ |
| 65 // TODO(rsadam): Remove this variable once figure out how to calculate this | 71 // TODO(rsadam): Remove this variable once figure out how to calculate this |
| 66 // number before the key is rendered. | 72 // number before the key is rendered. |
| 67 var KEY_PADDING_TOP = 1; | 73 var KEY_PADDING_TOP = 1; |
| 68 var KEY_PADDING_BOTTOM = 1; | 74 var KEY_PADDING_BOTTOM = 1; |
| 69 | 75 |
| 70 /** | 76 /** |
| 71 * The default volume for keyboard sounds. | 77 * The size of the pool to use for playing audio sounds on key press. This is to |
| 78 * enable the same sound to be overlayed, for example, when a repeat key is |
| 79 * pressed. |
| 72 * @type {number} | 80 * @type {number} |
| 73 */ | 81 */ |
| 74 var DEFAULT_VOLUME = 0.3; | 82 var SOUND_POOL_SIZE = 10; |
| OLD | NEW |