Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ui / keyboard / resources / constants.js
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
3 // found in the LICENSE file.
4
5 var RowAlignment = {
6   STRETCH: "stretch",
7   LEFT: "left",
8   RIGHT: "right",
9   CENTER: "center",
10 }
11
12 /**
13  * Ratio of key height and font size.
14  * @type {number}
15  */
16 var FONT_SIZE_RATIO = 2.5;
17
18 /**
19  * @type {enum}
20  * Possible layout alignments.
21  */
22 var LayoutAlignment = {
23   CENTER: "center",
24   STRETCH: "stretch",
25 }
26
27 /**
28  * The enumeration of swipe directions.
29  * @const
30  * @type {Enum}
31  */
32 var SwipeDirection = {
33   RIGHT: 0x1,
34   LEFT: 0x2,
35   UP: 0x4,
36   DOWN: 0x8
37 };
38
39 /**
40  * The default weight of a key in the X direction.
41  * @type {number}
42  */
43 var DEFAULT_KEY_WEIGHT_X = 100;
44
45 /**
46  * The default weight of a key in the Y direction.
47  * @type {number}
48  */
49 var DEFAULT_KEY_WEIGHT_Y = 70;
50
51 /**
52  * The top padding on each key.
53  * @type {number}
54  */
55 // TODO(rsadam): Remove this variable once figure out how to calculate this
56 // number before the key is rendered.
57 var KEY_PADDING_TOP = 1;
58 var KEY_PADDING_BOTTOM = 1;