👀 Reading hidden code
using HypertextLiteral
: @htl, @htl_str
MethodError: no method matching iterate(::Missing)
Closest candidates are:
iterate(::Union{LinRange, StepRangeLen}) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/range.jl:826
iterate(::Union{LinRange, StepRangeLen}, ::Integer) at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/range.jl:826
iterate(::T) where T<:Union{Base.KeySet{<:Any, <:Dict}, Base.ValueIterator{<:Dict}} at /opt/hostedtoolcache/julia/1.7.3/x64/share/julia/base/dict.jl:695
...
Here is what happened, the most recent locations are first:
- indexed_iterate
(I::Missing, i::Int64) from tuple.jl:92 - from This cell: line 1
center_position, scale = result;
Silly computer!
👀 Reading hidden code
Another cell defining center_position contains errors.
Probably not your fault!
👀 Reading hidden code
Another cell defining scale contains errors.
Oh no! 🙀
scale
👀 Reading hidden code
@bind result @htl """
<div class="zoomjs container" style="width: 600px; height: 600px;">
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ef/Pluto_in_True_Color_-_High-Res.jpg/1024px-Pluto_in_True_Color_-_High-Res.jpg">
<script>
let value = [[], 1]
const {default: zoomjs} = await import("https://esm.sh/vanilla-js-wheel-zoom@6.16.0?pin=v96")
const parent = currentScript.parentElement
const img = parent.firstElementChild
let zoomjs_result
const update_value = () => {
parent.value = [
[
zoomjs_result.content.currentLeft,
zoomjs_result.content.currentTop,
],
zoomjs_result.content.currentScale,
]
parent.dispatchEvent(new CustomEvent("input"))
}
zoomjs_result = zoomjs.create(img, {
maxScale: 10,
rescale: update_value,
dragScrollableOptions: {
onMove: update_value,
},
})
update_value()
</script>
<style>
.zoomjs.container {
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
background: #999;
}
.zoomjs img {
position: relative;
display: flex;
align-items: center;
}
</style>
</span>
"""
👀 Reading hidden code