Commit 178114a7 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Switch off focusbox movement on button mouseout

parent c57dc2d4
...@@ -289,19 +289,23 @@ function dt_status(element_name) { ...@@ -289,19 +289,23 @@ function dt_status(element_name) {
this.fb_plus_command = new controller_command("focusbox_plus", "bool"); this.fb_plus_command = new controller_command("focusbox_plus", "bool");
this.fb_min_command = new controller_command("focusbox_min", "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); dt_status_this.fb_plus_command.send(1);
} });
this.button_fb_p.onmouseup = function() { function fb_p_disable(e) {
dt_status_this.fb_plus_command.send(0); 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); dt_status_this.fb_min_command.send(1);
} });
this.button_fb_m.onmouseup = function() { function fb_m_disable(e) {
dt_status_this.fb_min_command.send(0); 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);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment