visjs/angular-visjs

Nodes and Labels are not redrawn

Tooa opened this issue ยท 0 comments

Tooa commented

Hi ๐Ÿ‘‹,

when the zoom is applied and you add nodes to a dataset that is linked to the directive, the nodes are not redrawn until you move the mouse or zoom out. I am not sure if this is a bug in visjs or in the angular-visjs directive.

This code exemplifies the problem. Start the application with http-server for testing. Then exercise the following steps to reproduce the problem:

  1. Zoom in. It's enough, when all labels are visible.
  2. Click in the textbox (upper right corner) and press (and hold) the arrow up button. You will notice, that nodes are removed from the graph. Do this until the limit is reached (0.0009) This works pretty well.
  3. Now press (and hold) the arrow down button.

Observation: Nodes and labels disappear. Zoom out or mouse moving will redraw the graph.

Why does this work for removing nodes, but not for adding nodes?