image-display-control-web-component
image-display-control-web-component copied to clipboard
🚀 Next-gen responsive <img>
In order to populate `data-image-regions=`, if parsing image metadata on the front-end is good enough, one has to write a bit of boilerplate at the moment, as shown in the...
At the moment, NPM detects a high severity vulnerability in one of our dependency. However `npm audit fix` doesn't help: ``` $ npm audit fix up to date, audited 774...
Related to #1
Is everything working fine if the script gets imported this way?
So far we have only [data-image-region-id=](https://github.com/Frameright/image-display-control-web-component/blob/main/image-display-control/docs/reference/attributes.md#data-image-region-id) for forcing the selection of a specific region. We could imagine other ways to influence the selection, like `data-image-region-name=`, possibly accepting a regex.
For now, [_findBestRegion()](https://github.com/Frameright/image-display-control-web-component/blob/main/image-display-control/src/ImageDisplayControl.ts#L378) only takes ratios into account, which isn't best.
So far we have implemented an `` web component. Implement a `` web component.
For accessibility, we could add the currently selected image region's name to the `alt=` attribute.
The main file `ImageDisplayControl.ts` has grown a lot recently and should be refactored. Some of the logic (calculations, region overlays, ...) should be moved away into different files with different...