Skip to content

Commit

Permalink
fixing linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jongund committed Jan 29, 2025
1 parent a257de4 commit 9bd2061
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions content/patterns/landmarks/js/image-resizing.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
'use strict';

function resizeImagesInFigures() {
const figures = document.querySelectorAll('#at figure');
for(let i = 0; i < figures.length; i++) {
const image = figures[i].querySelector('img');
if (image) {
const rect = figures[i].getBoundingClientRect();
image.style.width = (rect.width - 16) + 'px';
const figures = document.querySelectorAll('#at figure');
for (let i = 0; i < figures.length; i++) {
const image = figures[i].querySelector('img');
if (image) {
const rect = figures[i].getBoundingClientRect();
image.style.width = (rect.width - 16) + 'px';
}
}
}
}

window.addEventListener('load', resizeImagesInFigures);
Expand Down

0 comments on commit 9bd2061

Please sign in to comment.