Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

almost remove those gaps

roryclearb938683e4046
diff --git a/clearcam/main.html b/clearcam/main.html
index f7cedd6..8fb7448 100644
--- a/clearcam/main.html
+++ b/clearcam/main.html
@@ -263,9 +263,11 @@
// Store the new orientation in a dataset attribute
rectangle.dataset.portrait = portrait ? "true" : "false";
- const currentHeight = rectangle.offsetHeight;
- let newWidth = portrait ? currentHeight * (9 / 16) : currentHeight * (16 / 9);
-
+ const currentHeight = rectangle.clientHeight;
+ let newWidth = portrait
+ ? Math.floor(currentHeight * (9 / 16))
+ : Math.floor(currentHeight * (16 / 9));
+
rectangle.style.width = `${newWidth}px`;
}
});