Revert MtFinger renaming
Previous cl rename MtFinger to TouchPoint. It seems to break some scripts. This
patch revert the renaming.
BUG=None
TEST=run webplot
Change-Id: I9e818b576a9ddf620dd5240a3e02aa1e06563f5f
Reviewed-on: https://chromium-review.googlesource.com/550577
Commit-Ready: Jingkui Wang <jkwang@google.com>
Tested-by: Jingkui Wang <jkwang@google.com>
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
diff --git a/webplot/webplot.js b/webplot/webplot.js
index 03020a5..ad14e0a 100644
--- a/webplot/webplot.js
+++ b/webplot/webplot.js
@@ -223,19 +223,19 @@
* MtbSnapshot(
* syn_time=1420522152.269537,
* button_pressed=False,
- * points =[
- * TouchPoint(tid=13, slot=0, syn_time=1420522152.269537, x=440, y=277,
- * pressure=33),
- * TouchPoint(tid=14, slot=1, syn_time=1420522152.269537, x=271, y=308,
- * pressure=38)
+ * fingers =[
+ * MtFinger(tid=13, slot=0, syn_time=1420522152.269537, x=440, y=277,
+ * pressure=33),
+ * MtFinger(tid=14, slot=1, syn_time=1420522152.269537, x=271, y=308,
+ * pressure=38)
* ]
* )
*/
Webplot.prototype.processSnapshot = function(snapshot) {
var edge = this.clickEdge;
- for (var i = 0; i < snapshot.points.length; i++) {
- var finger = snapshot.points[i];
+ for (var i = 0; i < snapshot.fingers.length; i++) {
+ var finger = snapshot.fingers[i];
// Update the color object if the finger is leaving.
if (finger.leaving) {
@@ -269,7 +269,7 @@
// In some special situation, the click comes with no fingers.
// This may happen if an insulated object is used to click the touchpad.
// Just draw the click at a random position.
- if (snapshot.points.length == 0 && snapshot.button_pressed == 1 &&
+ if (snapshot.fingers.length == 0 && snapshot.button_pressed == 1 &&
!this.clickDown) {
var x = Math.random() * this.canvas.innerWidth +
this.canvas.innerOffsetLeft;