Browse Source

Highlight offset window title on change

jeroen
Tammo Jan Dijkema 4 years ago
parent
commit
d668e7ef7b
1 changed files with 15 additions and 1 deletions
  1. +15
    -1
      console/js/offset.js

+ 15
- 1
console/js/offset.js View File

@ -142,17 +142,31 @@ function offset(element_name) {
*/
this.highlight_title = function(az, el)
{
if (az!=0 || el!=0)
{
this.window.title.element.style.background = 'yellow';
}
else
{
this.window.title.element.style.background = 'silver';
}
}
this.set_offset = function(az, el)
{
this.val_az.value_set(decimals(rad2deg(az), 4));
this.val_el.value_set(decimals(rad2deg(el), 4));
this.highlight_title(az, el);
}
this.send = function(az, el)
{
az = deg2rad(floatval(az));
el = deg2rad(floatval(el));
this.highlight_title(az, el);
dt_websocket_send("command offset" + " " + az + " " + el);
}


Loading…
Cancel
Save