Published
Edited
Nov 11, 2021
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
ImageZoom = (await import('https://cdn.skypack.dev/js-image-zoom@0.7.0?min')).default
Insert cell
out = html`
<div id="img-container" style="width: 500px; height: 300px; position: relative; border: 3px solid red; margin: 2px;">
<img src="http://malaman.github.io/js-image-zoom/example/1.jpg" style="width: 500px; height: 300px;"/>
<div>
`
Insert cell
options = ({
width: 500,
offset: {vertical: 0, horizontal: 5}
});
Insert cell
options2 = ({
fillContainer: true,
offset: { vertical: 0, horizontal: 10}
})
Insert cell
{
new ImageZoom(document.getElementById("img-container"), options);
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more