Don't preload rarely seen large images
[chromium-blink-merge.git] / third_party / google_input_tools / src / chrome / os / inputview / layouts / rowsofjp.js
blobd25403968893ce19cfddf5e44c2d618c49230e1c
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.provide('i18n.input.chrome.inputview.layouts.RowsOfJP');
16 goog.require('i18n.input.chrome.inputview.layouts.util');
20 goog.scope(function() {
21 var util = i18n.input.chrome.inputview.layouts.util;
24 /**
25 * Creates the top four rows for Japanese keyboard.
27 * @return {!Array.<!Object>} The rows.
29 i18n.input.chrome.inputview.layouts.RowsOfJP.create = function() {
30 var baseKeySpec = {
31 'widthInWeight': 1,
32 'heightInWeight': 1
35 // Row1
36 var keySequenceOf15 = util.createKeySequence(baseKeySpec, 15);
37 var row1 = util.createLinearLayout({
38 'id': 'row1',
39 'children': [keySequenceOf15]
40 });
43 // Row2 and row3
45 // First linear layout at the left of the enter.
46 var tabKey = i18n.input.chrome.inputview.layouts.util.createKey({
47 'widthInWeight': 1.5
48 });
49 var keySequenceOf11 = i18n.input.chrome.inputview.layouts.util.
50 createKeySequence(baseKeySpec, 11);
51 var slashKey = i18n.input.chrome.inputview.layouts.util.createKey({
52 'widthInWeight': 1.25
53 });
54 var row2 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
55 'id': 'row2',
56 'children': [tabKey, keySequenceOf11, slashKey]
57 });
59 // Second linear layout at the right of the enter.
60 var capslockKey = i18n.input.chrome.inputview.layouts.util.createKey({
61 'widthInWeight': 1.75
62 });
63 var keySequenceOf12 = i18n.input.chrome.inputview.layouts.util.
64 createKeySequence(baseKeySpec, 12);
65 var row3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
66 'id': 'row3',
67 'children': [capslockKey, keySequenceOf12]
68 });
70 // Vertical layout contains the two rows at the left of the enter.
71 var vLayout = i18n.input.chrome.inputview.layouts.util.createVerticalLayout({
72 'id': 'row2-3-left',
73 'children': [row2, row3]
74 });
76 // Vertical layout contains enter key.
77 var enterKey = i18n.input.chrome.inputview.layouts.util.createKey({
78 'widthInWeight': 1.25,
79 'heightInWeight': 2
80 });
81 var enterLayout = i18n.input.chrome.inputview.layouts.util.
82 createVerticalLayout({
83 'id': 'row2-3-right',
84 'children': [enterKey]
85 });
87 // Linear layout contains the two vertical layout.
88 var row2and3 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
89 'id': 'row2-3',
90 'children': [vLayout, enterLayout]
91 });
93 // Row4
94 var shiftLeft = i18n.input.chrome.inputview.layouts.util.createKey({
95 'widthInWeight': 2.25
96 });
97 keySequenceOf11 = i18n.input.chrome.inputview.layouts.util.createKeySequence(
98 baseKeySpec, 11);
99 var shiftRight = i18n.input.chrome.inputview.layouts.util.createKey({
100 'widthInWeight': 1.75
102 var row4 = i18n.input.chrome.inputview.layouts.util.createLinearLayout({
103 'id': 'row4',
104 'children': [shiftLeft, keySequenceOf11, shiftRight]
107 return [row1, row2and3, row4];
109 }); // goog.scope