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

sg_noverlap() shows graph only after resize #16

Open
sgrubsmyon opened this issue Dec 2, 2020 · 1 comment
Open

sg_noverlap() shows graph only after resize #16

sgrubsmyon opened this issue Dec 2, 2020 · 1 comment

Comments

@sgrubsmyon
Copy link
Collaborator

sgrubsmyon commented Dec 2, 2020

Running the example from ?sg_noverlap:

nodes <- sg_make_nodes(500)
edges <- sg_make_edges(nodes)

sigmajs() %>%
  sg_nodes(nodes, id, size, color) %>%
  sg_edges(edges, id, source, target) %>%
  sg_layout() %>% 
  sg_noverlap()

I see a blank page. However, if I resize the page/canvas container/browser window, the graph is rendered. Tested this in RStudio 1.3.1093, Firefox 83.0, and Chromium 87.0.4280.67. The behavior is always the same.

This is sigmajs version 0.1.5 installed from CRAN.

In the browser DevTools, I see the following console message: (/tmp/sg_noverlap.html is the file with the sigmajs htmlwidget exported with RStudio)

Uncaught TypeError: p[d.id] is undefined
    atomicGo file:///tmp/sg_noverlap.html:913
    go file:///tmp/sg_noverlap.html:913
    start file:///tmp/sg_noverlap.html:913
    startNoverlap file:///tmp/sg_noverlap.html:913
    renderValue file:///tmp/sg_noverlap.html:1142
    renderValue file:///tmp/sg_noverlap.html:891
    staticRender file:///tmp/sg_noverlap.html:658
    forEach file:///tmp/sg_noverlap.html:60
    staticRender file:///tmp/sg_noverlap.html:581
    forEach file:///tmp/sg_noverlap.html:60
    staticRender file:///tmp/sg_noverlap.html:579
    maybeStaticRenderLater file:///tmp/sg_noverlap.html:703
    <anonymous> file:///tmp/sg_noverlap.html:710
    EventListener.handleEvent* file:///tmp/sg_noverlap.html:708
    <anonymous> file:///tmp/sg_noverlap.html:907
sg_noverlap.html:913:2006
    atomicGo file:///tmp/sg_noverlap.html:913
    go file:///tmp/sg_noverlap.html:913
    start file:///tmp/sg_noverlap.html:913
    startNoverlap file:///tmp/sg_noverlap.html:913
    renderValue file:///tmp/sg_noverlap.html:1142
    renderValue file:///tmp/sg_noverlap.html:891
    staticRender file:///tmp/sg_noverlap.html:658
    forEach self-hosted:206
    forEach file:///tmp/sg_noverlap.html:60
    staticRender file:///tmp/sg_noverlap.html:581
    forEach self-hosted:206
    forEach file:///tmp/sg_noverlap.html:60
    staticRender file:///tmp/sg_noverlap.html:579
    maybeStaticRenderLater file:///tmp/sg_noverlap.html:703
    <anonymous> file:///tmp/sg_noverlap.html:710
    (Async: EventListener.handleEvent)
    <anonymous> file:///tmp/sg_noverlap.html:708
    <anonymous> file:///tmp/sg_noverlap.html:907
@JohnCoene
Copy link
Owner

Strange, that looks like it's in the core noverlap plugin, I might have to update that. I'll investigate this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants