Hi, great library!
In using this I've wanted to use it for images within the <picture> element
Because image-focus looks for the parentElement of an image as the container, styling can get messed up if the parent is a <picture>. This line has worked as a fix for me, bypassing the parent <picture>
this.container = imageNode.parentElement.tagName == "PICTURE" ? imageNode.parentElement.parentElement : imageNode.parentElement;
Alternatively, allow me to explicitly set a container option that would override the default parentElement
Hi, great library!
In using this I've wanted to use it for images within the
<picture>elementBecause image-focus looks for the
parentElementof an image as the container, styling can get messed up if the parent is a<picture>. This line has worked as a fix for me, bypassing the parent<picture>Alternatively, allow me to explicitly set a container option that would override the default parentElement