aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/switchPanTilt.ts
blob: 9422effa4c7556bbc6d93b50f75d13a5bc392a16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * Triggered by the pantilt checkbox
 */
export async function switchPanTilt() {
  const fullview = document.getElementById("client_fullview")!;
  const checkbox = <HTMLInputElement>document.getElementById("client_pantilt");

  if (checkbox.checked) {
    fullview.style.transition = "0.5s ease-in-out";
  } else {
    fullview.style.transition = "none";
  }

  return;
}
window.switchPanTilt = switchPanTilt;