BraydenMoore commited on
Commit
ed76384
·
1 Parent(s): b11b450

Update styling

Browse files
Files changed (2) hide show
  1. web/static/script.js +3 -3
  2. web/static/styles.css +1 -1
web/static/script.js CHANGED
@@ -43,8 +43,8 @@ document.addEventListener("DOMContentLoaded", () => {
43
  const dropzoneHeight = dropzone.offsetHeight;
44
  const imageWidth = uploadedImage.width;
45
  const imageHeight = uploadedImage.height;
46
- const widthScale = dropzoneWidth / imageWidth;
47
- const heightScale = dropzoneHeight / imageHeight;
48
  const scaleFactor = Math.min(widthScale, heightScale);
49
  uploadedImage.width = imageWidth * (scaleFactor-0.1);
50
  uploadedImage.height = imageHeight * (scaleFactor-0.1);
@@ -97,7 +97,7 @@ featureSelect.addEventListener("change", () => {
97
  });
98
 
99
  function displayResults(data) {
100
- thinkingText.innerText = "Looks like...";
101
  const predictedImagesContainer = document.getElementById("predicted-images");
102
  predictedImagesContainer.innerHTML = ""; // Clear previous images
103
 
 
43
  const dropzoneHeight = dropzone.offsetHeight;
44
  const imageWidth = uploadedImage.width;
45
  const imageHeight = uploadedImage.height;
46
+ const widthScale = 225 / imageWidth;
47
+ const heightScale = 225 / imageHeight;
48
  const scaleFactor = Math.min(widthScale, heightScale);
49
  uploadedImage.width = imageWidth * (scaleFactor-0.1);
50
  uploadedImage.height = imageHeight * (scaleFactor-0.1);
 
97
  });
98
 
99
  function displayResults(data) {
100
+ thinkingText.innerText = "";
101
  const predictedImagesContainer = document.getElementById("predicted-images");
102
  predictedImagesContainer.innerHTML = ""; // Clear previous images
103
 
web/static/styles.css CHANGED
@@ -22,7 +22,6 @@ body {
22
  .dropzone {
23
  margin-top: 20px;
24
  width: 95%;
25
- min-height: 500px;
26
  border: 2px solid #000000;
27
  display: flex;
28
  justify-content: center;
@@ -164,6 +163,7 @@ visibility: visible; /* Show the tooltip on image hover */
164
  }
165
 
166
  .dropzone {
 
167
  width: 48%;
168
  }
169
 
 
22
  .dropzone {
23
  margin-top: 20px;
24
  width: 95%;
 
25
  border: 2px solid #000000;
26
  display: flex;
27
  justify-content: center;
 
163
  }
164
 
165
  .dropzone {
166
+ min-height: 500px;
167
  width: 48%;
168
  }
169