Browse Source

Switch off focusbox movement on button mouseout

jeroen
Tammo Jan Dijkema 4 years ago
parent
commit
178114a7a8
1 changed files with 14 additions and 10 deletions
  1. +14
    -10
      console/js/dt_status.js

+ 14
- 10
console/js/dt_status.js View File

@ -289,19 +289,23 @@ function dt_status(element_name) {
this.fb_plus_command = new controller_command("focusbox_plus", "bool");
this.fb_min_command = new controller_command("focusbox_min", "bool");
this.button_fb_p.onmousedown = function() {
this.button_fb_p.element.addEventListener("mousedown", function() {
dt_status_this.fb_plus_command.send(1);
}
this.button_fb_p.onmouseup = function() {
dt_status_this.fb_plus_command.send(0);
}
});
function fb_p_disable(e) {
dt_status_this.fb_plus_command.send(0);
}
this.button_fb_p.element.addEventListener("mouseup", fb_p_disable);
this.button_fb_p.element.addEventListener("mouseout", fb_p_disable);
this.button_fb_m.onmousedown = function() {
this.button_fb_m.element.addEventListener("mousedown", function() {
dt_status_this.fb_min_command.send(1);
}
this.button_fb_m.onmouseup = function() {
dt_status_this.fb_min_command.send(0);
}
});
function fb_m_disable(e) {
dt_status_this.fb_min_command.send(0);
}
this.button_fb_m.element.addEventListener("mouseup", fb_m_disable);
this.button_fb_m.element.addEventListener("mouseout", fb_m_disable);
}


Loading…
Cancel
Save