Platform
Resources
Pricing
Sign in
Get started
Andrew Wooldridge
📜JavaScript developer. 🐲RPG fan. 📚Storyteller and 🕹game developer. 👨Father and Husband.
Workspace
Fork
Published
Tips and Utilities
By
Andrew Wooldridge
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ImageZoom
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
out
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
options
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
options2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML