diff options
| author | Caleb <caleb.mabry.15@cnu.edu> | 2022-09-07 17:01:25 -0400 |
|---|---|---|
| committer | Caleb <caleb.mabry.15@cnu.edu> | 2022-09-07 17:01:25 -0400 |
| commit | 3f8d0974b327e663328bc36cd97f1ba1855a2269 (patch) | |
| tree | fe9a18c8c0cdbf1ab8ef037af6f98a53b0ea018f /webAO/dom/switchPanTilt.ts | |
| parent | 5362069a05b4bfbef03f37605af979aa3cf0e066 (diff) | |
Added more functions
Diffstat (limited to 'webAO/dom/switchPanTilt.ts')
| -rw-r--r-- | webAO/dom/switchPanTilt.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/webAO/dom/switchPanTilt.ts b/webAO/dom/switchPanTilt.ts new file mode 100644 index 0000000..7ceea06 --- /dev/null +++ b/webAO/dom/switchPanTilt.ts @@ -0,0 +1,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;
\ No newline at end of file |
