From 3f8d0974b327e663328bc36cd97f1ba1855a2269 Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 7 Sep 2022 17:01:25 -0400 Subject: Added more functions --- webAO/dom/switchPanTilt.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 webAO/dom/switchPanTilt.ts (limited to 'webAO/dom/switchPanTilt.ts') 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 = 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 -- cgit