Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior when inspecting lines in WGLMakie #3672

Open
kbarros opened this issue Mar 3, 2024 · 1 comment
Open

Strange behavior when inspecting lines in WGLMakie #3672

kbarros opened this issue Mar 3, 2024 · 1 comment
Labels
bug WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.

Comments

@kbarros
Copy link
Contributor

kbarros commented Mar 3, 2024

This is a follow-on to #3503. Not an immediate blocker for us; we've moved away from WGLMakie due to multiple issues (SunnySuite/Sunny.jl#211). GLMakie gives an overall more robust experience, and we're happy with it.

The following snippet leads to strange behavior, as shown in the movie below.

using WGLMakie
begin
    segments = Point2f[(0, 0), (0, 1), (1, 0), (1, 2)]
    color = [:red, :black, :blue, :black]
    inspector_label(_, i, _) = (@show Int(i); ["hello", "world", "nice", "day"][mod1(i, 4)])
    fig, ax, pl = linesegments(segments; color, inspector_label, linewidth=10)
    DataInspector(ax)
    display(fig; backend=WGLMakie)
end
2D_example.mov
@kbarros kbarros added the bug label Mar 3, 2024
@t-bltg t-bltg added the WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie. label Mar 3, 2024
@kbarros
Copy link
Contributor Author

kbarros commented Mar 24, 2024

If anyone else encounters this, a workaround for us was to use arrows instead of linesegments. Setting arrowsize = 0 draws just the line part of an arrow, as a cylinder. With arrows, the inspector pop-up works well in both GLMakie and WGLMakie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug WGLMakie This relates to WGLMakie.jl, the Web-based WebGL backend for Makie.
Projects
None yet
Development

No branches or pull requests

2 participants