If no button is associated with the event, assume it is a mouseup

This commit is contained in:
Isaac Connor 2021-04-16 10:24:48 -04:00
parent c9f83de5f4
commit c880618d5f
1 changed files with 9 additions and 3 deletions

View File

@ -672,7 +672,8 @@ if ( monitorType != 'WebSite' ) {
} }
var controlReq = new Request.JSON( { var controlReq = new Request.JSON( {
url: monitorUrl, url: monitorUrl,
method: 'post', method: 'get',
//method: 'post',
timeout: AJAX_TIMEOUT, timeout: AJAX_TIMEOUT,
link: 'cancel', link: 'cancel',
onSuccess: getControlResponse onSuccess: getControlResponse
@ -691,12 +692,17 @@ function getControlResponse(respObj, respText) {
function controlCmd(event) { function controlCmd(event) {
button = event.target; button = event.target;
if (event.buttons) {
control = button.getAttribute('value'); control = button.getAttribute('value');
} else {
console.log('stop');
control = 'moveStop';
}
xtell = button.getAttribute('data-xtell'); xtell = button.getAttribute('data-xtell');
ytell = button.getAttribute('data-ytell'); ytell = button.getAttribute('data-ytell');
var locParms = ''; var locParms = '';
if ( event && (xtell || ytell) ) { if (xtell || ytell) {
var target = event.target; var target = event.target;
var coords = $(target).getCoordinates(); var coords = $(target).getCoordinates();