netmap algorithm indicator turns red when clicking on something in left bar
Bug #1057423 reported by
John-Magne Bredal
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Low
|
Roy Sindre Norangshol |
Bug Description
The force algorithm state indicator indicates if the algorithm is running or not. A green means running and a red means not running. When interacting with the left bar (clicking on categories, mark by position etc) this indicator turns red even though the algorithm is running.
Changed in nav: | |
importance: | Undecided → Low |
status: | New → Confirmed |
milestone: | none → 3.12.2 |
Changed in nav: | |
milestone: | 3.12.2 → none |
assignee: | nobody → Roy Sindre Norangshol (norangshol) |
Changed in nav: | |
status: | In Progress → Fix Committed |
milestone: | none → 3.15.0 |
Changed in nav: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Done some more research on this issue:
draw_map.js inner function draw in render() registers two callsbacks that should trigger when force has started running, and force has stopped.
Line 397-403 of current writing:
self. force.on( 'start' , function () {
self. broker. trigger( "map:forceChang edStatus" , true);
<code>
});
});
</code>
Now due to the current workflow (dependency injection from a page request to every backbone views for redrawing (ew) ...) the clear() function in draw_map.js gets triggered from events on the left side bar.
This clear() function removes the SVG from the DOM and recreates it.
Since we're only attaching the listeners after graph data is loaded, the current code is put in the wrong spot for the logic to work.
Now the problem is:
Moving these listeners to be attached inside the clean() function doesn't work as intended.
For some odd reason, (I dont remember which event atm) either only the «start» or «end» event is what get's triggered for some reason.
I tried to not remove the SVG from the DOM and let it stay to see if the events would arrive as they should, but still the same issue.
I hope the «cleanup»-branch I'm working on will fix this issue which is to convert Netmap to be event-based only + removing the requirements of actually having to redraw the SVG :-/