* Create an element that fills its container.
(url: string)
| 470 | * Create an <img> element that fills its container. |
| 471 | */ |
| 472 | function createFillImage(url: string): HTMLImageElement { |
| 473 | const img = document.createElement('img') |
| 474 | img.src = url |
| 475 | img.style.width = '100%' |
| 476 | img.style.height = '100%' |
| 477 | img.style.objectFit = 'fill' |
| 478 | img.style.display = 'block' |
| 479 | img.draggable = false |
| 480 | return img |
| 481 | } |
| 482 | |
| 483 | // --------------------------------------------------------------------------- |
| 484 | // Duotone Effect |
no outgoing calls
no test coverage detected