Update index.js
Browse files
index.js
CHANGED
@@ -337,11 +337,11 @@ fileUpload.addEventListener('change', function(e) {
|
|
337 |
|
338 |
const image = await RawImage.fromURL(url);
|
339 |
|
340 |
-
const ar = image.width / image.height;
|
341 |
-
const [cw, ch] = (ar > 1) ? [640, 640 / ar] : [640 * ar, 640];
|
342 |
-
imageContainer.style.width = `${cw}px`;
|
343 |
-
imageContainer.style.height = `${ch}px`;
|
344 |
-
imageContainer.style.backgroundImage = `url(${url})`;
|
345 |
|
346 |
const reader = new FileReader();
|
347 |
// reader.onload = e2 => parse(e2.target.result, '');
|
|
|
337 |
|
338 |
const image = await RawImage.fromURL(url);
|
339 |
|
340 |
+
// const ar = image.width / image.height;
|
341 |
+
// const [cw, ch] = (ar > 1) ? [640, 640 / ar] : [640 * ar, 640];
|
342 |
+
// imageContainer.style.width = `${cw}px`;
|
343 |
+
// imageContainer.style.height = `${ch}px`;
|
344 |
+
// imageContainer.style.backgroundImage = `url(${url})`;
|
345 |
|
346 |
const reader = new FileReader();
|
347 |
// reader.onload = e2 => parse(e2.target.result, '');
|