Skip to content

Commit 23e55c0

Browse files
committed
fix initial visibility
1 parent 69fadec commit 23e55c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: src/makielayout/blocks.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -665,15 +665,16 @@ function tooltip!(b::Block, str::AbstractString; placement=:above, visible=:alwa
665665
end
666666
tt = tooltip!(b.blockscene, position, str; placement, kwargs...)
667667
translate!(tt, 0, 0, depth)
668-
onany(b.blockscene.events.mouseposition, visible) do mp, v
668+
onany(b.blockscene.events.mouseposition, b.layoutobservables.computedbbox, visible) do mp, bbox, v
669669
tt.visible[] = if v == :never
670670
false
671671
elseif v == :hover
672-
mp in b.layoutobservables.computedbbox[]
672+
mp in bbox
673673
else
674674
v == :always || @error("invalid value for tooltip visible, using :always")
675675
true
676676
end
677677
end
678+
notify(b.blockscene.events.mouseposition)
678679
return tt
679680
end

0 commit comments

Comments
 (0)