Replace oneofone with imaging for image resize

This commit is contained in:
2024-08-09 14:21:45 -04:00
parent 014c180a1e
commit b4d58817a5
4 changed files with 7 additions and 11 deletions

View File

@ -43,7 +43,7 @@ function main() {
loadPhotosBtn.onclick = () => loadPhotos()
makeCollageBtn.onclick = () => gotoCollage()
/** @type HTMLImageElement[] */
/** @type HTMLCollectionOf<HTMLImageElement> */
const selectedPhotos = selectedPhotosDiv.getElementsByTagName("img")
for (const img of selectedPhotos) {
img.onclick = () => {
@ -110,7 +110,7 @@ function loadPhotos() {
albumPhotosDiv.appendChild(img)
}
/** @type HTMLImageElement[] */
/** @type HTMLCollectionOf<HTMLImageElement> */
const photoImgs = albumPhotosDiv.children
for(const photo of photoImgs) {
photo.onclick = () => {
@ -124,7 +124,7 @@ function loadPhotos() {
}
function gotoCollage() {
/** @type HTMLImageElement[] */
/** @type HTMLCollectionOf<HTMLImageElement> */
const selectedPhotos = selectedPhotosDiv.getElementsByTagName("img")
/** @type String[] */
const photoUrls = [];