Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/google_input_tools/src/chrome/os/inputview/strokehandler.js

Issue 701603002: Update to google-input-tools version 1.0.5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/google_input_tools/src/chrome/os/inputview/strokehandler.js
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/strokehandler.js b/third_party/google_input_tools/src/chrome/os/inputview/strokehandler.js
index 520b535d327a43697af088e8cb5c99b41ae32462..46a47cc7eca5f738186391b0038d9ff6cd20cc01 100644
--- a/third_party/google_input_tools/src/chrome/os/inputview/strokehandler.js
+++ b/third_party/google_input_tools/src/chrome/os/inputview/strokehandler.js
@@ -191,30 +191,30 @@ i18n.input.hwt.StrokeHandler.prototype.disposeInternal = function() {
*
* @param {number} x The x.
* @param {number} y The y.
- * @param {number} time The time in milisecond.
+ * @param {number} time The time in miliseconds.
* @constructor
*/
i18n.input.hwt.StrokeHandler.Point = function(x, y, time) {
/**
- * The left offset relative to the canvas.
+ * The left offset relative to the canvas, rounded to 2 decimal places.
*
* @type {number}
*/
- this.x = x;
+ this.x = Math.round(x * 100.0) * 0.01;
/**
- * The top offset relative to the canvas.
+ * The top offset relative to the canvas, rounded to 2 decimal places.
*
* @type {number}
*/
- this.y = y;
+ this.y = Math.round(y * 100.0) * 0.01;
/**
- * The time.
+ * The time, rounded to the nearest millisecond.
*
* @type {number}
*/
- this.time = time;
+ this.time = Math.round(time);
};

Powered by Google App Engine
This is Rietveld 408576698