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