From 16a36a3d264de70b0cc2fbdfcb7b4ac48363645d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Mon, 4 Sep 2017 01:49:17 +0200 Subject: [PATCH] cleaning --- html_orig/js/app.js | 13 ++++++------- html_orig/jssrc/term.js | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/html_orig/js/app.js b/html_orig/js/app.js index 7844f4e..bc27b37 100644 --- a/html_orig/js/app.js +++ b/html_orig/js/app.js @@ -2196,20 +2196,19 @@ var Input = (function() { } }, onMouseMove: function(x, y) { - // TODO gather held buttons & key modifiers var b = (mb1?1:0) | (mb2?2:0) | (mb3?4:0); var m = packModifiersForMouse(); Conn.send("MM:"+y+','+x+','+b+','+m); }, - onMouseDown: function(x, y, which) { - if(which>3) return; + onMouseDown: function(x, y, b) { + if(b>3) return; var m = packModifiersForMouse(); - Conn.send("MP:"+y+','+x+','+which+','+m); + Conn.send("MP:"+y+','+x+','+b+','+m); }, - onMouseUp: function(x, y, which) { - if(which>3) return; + onMouseUp: function(x, y, b) { + if(b>3) return; var m = packModifiersForMouse(); - Conn.send("MR:"+y+','+x+','+which+','+m); + Conn.send("MR:"+y+','+x+','+b+','+m); }, onMouseWheel: function(x, y, dir) { // -1 ... btn 4 (away from user) diff --git a/html_orig/jssrc/term.js b/html_orig/jssrc/term.js index c914349..4722c2b 100644 --- a/html_orig/jssrc/term.js +++ b/html_orig/jssrc/term.js @@ -630,20 +630,19 @@ var Input = (function() { } }, onMouseMove: function(x, y) { - // TODO gather held buttons & key modifiers var b = (mb1?1:0) | (mb2?2:0) | (mb3?4:0); var m = packModifiersForMouse(); Conn.send("MM:"+y+','+x+','+b+','+m); }, - onMouseDown: function(x, y, which) { - if(which>3) return; + onMouseDown: function(x, y, b) { + if(b>3) return; var m = packModifiersForMouse(); - Conn.send("MP:"+y+','+x+','+which+','+m); + Conn.send("MP:"+y+','+x+','+b+','+m); }, - onMouseUp: function(x, y, which) { - if(which>3) return; + onMouseUp: function(x, y, b) { + if(b>3) return; var m = packModifiersForMouse(); - Conn.send("MR:"+y+','+x+','+which+','+m); + Conn.send("MR:"+y+','+x+','+b+','+m); }, onMouseWheel: function(x, y, dir) { // -1 ... btn 4 (away from user)