Update to google-input-tools version 1.0.5.0
[chromium-blink-merge.git] / third_party / google_input_tools / src / chrome / os / inputview / layouts / compactkbd_numberpad_layout.js
blob42cdb5522ddda58c985a7ec13fcfdde7d667f63a
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License.
3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software
7 //
8 //      http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // You may obtain a copy of the License at
11 // you may not use this file except in compliance with the License.
12 // Licensed under the Apache License, Version 2.0 (the "License");
14 goog.require('i18n.input.chrome.inputview.layouts.RowsOfNumberpad');
15 goog.require('i18n.input.chrome.inputview.layouts.util');
18 (function() {
19   i18n.input.chrome.inputview.layouts.util.keyIdPrefix = 'compactkbd-k-';
21   var rows = i18n.input.chrome.inputview.layouts.RowsOfNumberpad.create();
23   // Keyboard view.
24   var keyboardView = i18n.input.chrome.inputview.layouts.util.createLayoutView({
25     'id': 'keyboardView',
26     'children': [rows],
27     'widthPercent': 50,
28     'heightPercent': 100
29   });
31   var keyboardContainer = i18n.input.chrome.inputview.layouts.util.
32       createLinearLayout({
33         'id': 'keyboardContainer',
34         'children': [keyboardView]
35       });
37   var data = {
38     'layoutID': 'compactkbd-numberpad',
39     'widthInWeight': 6.45,
40     'children': [keyboardContainer],
41     'disableCandidateView': true,
42     'widthPercent' : {
43          'HORIZONTAL' : 0.56,
44          'VERTICAL' : 0.56,
45          'HORIZONTAL_WIDE_SCREEN': 0.56
46   }};
48   google.ime.chrome.inputview.onLayoutLoaded(data);
50 }) ();