refactoring

This commit is contained in:
Devaev Maxim
2018-12-18 23:25:23 +03:00
parent 8867b32356
commit 3e7b5bf049
6 changed files with 20 additions and 16 deletions

View File

@@ -23,7 +23,7 @@ function Mouse() {
$("stream-box").onwheel = __wheelHandler;
$("stream-box").ontouchstart = (event) => __touchMoveHandler(event);
Array.prototype.forEach.call(document.querySelectorAll("[data-mouse-button]"), function(el_button) {
tools.forEach($$$("[data-mouse-button]"), function(el_button) {
var button = el_button.getAttribute("data-mouse-button");
tools.setOnDown(el_button, () => __sendButton(button, true));
tools.setOnUp(el_button, () => __sendButton(button, false));