Skip to content

Commit

Permalink
Updated formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan3-14 committed Jan 10, 2024
1 parent 3003a1b commit 4637c81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions info_square/icon_positions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const set_positions = () => {
var temperature_icons = document.getElementsByClassName("temperature_icon");
var left_margin = 30;
var top_margin = 0;
for (let i=0; i<weather_icons.length; i++) {
for (let i = 0; i < weather_icons.length; i++) {
left_margin += 60;
if (i % 3 == 0) {
left_margin = 30;
Expand All @@ -14,14 +14,14 @@ const set_positions = () => {
if (i == 9) {
left_margin += 60;
}

weather_icons[i].style.marginLeft = left_margin + "px";
weather_icons[i].style.marginTop = top_margin + "px";
}

top_margin += 45;
left_margin = -15;
for (let i=0; i<temperature_icons.length; i++){
for (let i = 0; i < temperature_icons.length; i++) {
left_margin += 45;
temperature_icons[i].style.marginLeft = left_margin + "px";
temperature_icons[i].style.marginTop = top_margin + "px";
Expand Down

0 comments on commit 4637c81

Please sign in to comment.