OLD | NEW |
(Empty) | |
| 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"); |
| 13 // |
| 14 goog.provide('i18n.input.chrome.inputview.handler.SwipeState'); |
| 15 |
| 16 |
| 17 |
| 18 /** |
| 19 * The state for the swipe action. |
| 20 * |
| 21 * @constructor |
| 22 */ |
| 23 i18n.input.chrome.inputview.handler.SwipeState = function() { |
| 24 /** |
| 25 * The offset in x-axis. |
| 26 * |
| 27 * @type {number} |
| 28 */ |
| 29 this.offsetX = 0; |
| 30 |
| 31 /** |
| 32 * The offset in y-axis. |
| 33 * |
| 34 * @type {number} |
| 35 */ |
| 36 this.offsetY = 0; |
| 37 |
| 38 /** |
| 39 * The previous x coordinate. |
| 40 * |
| 41 * @type {number} |
| 42 */ |
| 43 this.previousX = 0; |
| 44 |
| 45 /** |
| 46 * The previous y coordinate. |
| 47 * |
| 48 * @type {number} |
| 49 */ |
| 50 this.previousY = 0; |
| 51 }; |
| 52 |
| 53 |
| 54 /** |
| 55 * Resets the state. |
| 56 */ |
| 57 i18n.input.chrome.inputview.handler.SwipeState.prototype.reset = |
| 58 function() { |
| 59 this.offsetX = this.offsetY = this.previousX = this.previousY = 0; |
| 60 }; |
| 61 |
OLD | NEW |