Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	Update index.js
Browse files
    	
        index.js
    CHANGED
    
    | 
         @@ -54,7 +54,7 @@ async function detect(url) { 
     | 
|
| 54 | 
         | 
| 55 | 
         
             
                // Set container width and height depending on the image aspect ratio
         
     | 
| 56 | 
         
             
                const ar = image.width / image.height;
         
     | 
| 57 | 
         
            -
                const [cw, ch] = (ar >  
     | 
| 58 | 
         
             
                imageContainer.style.width = `${cw}px`;
         
     | 
| 59 | 
         
             
                imageContainer.style.height = `${ch}px`;
         
     | 
| 60 | 
         | 
| 
         | 
|
| 54 | 
         | 
| 55 | 
         
             
                // Set container width and height depending on the image aspect ratio
         
     | 
| 56 | 
         
             
                const ar = image.width / image.height;
         
     | 
| 57 | 
         
            +
                const [cw, ch] = (ar > 1) ? [640, 640 / ar] : [640 * ar, 640];
         
     | 
| 58 | 
         
             
                imageContainer.style.width = `${cw}px`;
         
     | 
| 59 | 
         
             
                imageContainer.style.height = `${ch}px`;
         
     | 
| 60 | 
         |