netmap algorithm indicator turns red when clicking on something in left bar

Bug #1057423 reported by John-Magne Bredal
6
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)
Revision history for this message
Roy Sindre Norangshol (norangshol) wrote :

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:
<code>
                self.force.on('start', function () {
                    self.broker.trigger("map:forceChangedStatus", true);
                });

                self.force.on('end', function () {
                    self.broker.trigger("map:forceChangedStatus", false);
                });
</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 :-/

Revision history for this message
Roy Sindre Norangshol (norangshol) wrote :

This should be fixed if your version contains 7ea2ad464638 , fix is part of a large rewrite to use d3js properly without clearing and reattaching a new SVG element. :-)

As now we support reloading graph topology at will. pewpew.

https://bitbucket.org/norrs/nav-mirror-netmap/commits/all/tip/branch%28%22netmap_cleanup%22%29

(default branch merged with my netmap_cleanup bookmark after the 3.14.15 release ;-))
(note: netmap_cleanup branch almost done, Ill post another update when its fully go on public merge - some visuals left to fix)

Changed in nav:
status: Confirmed → Fix Committed
status: Fix Committed → In Progress
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.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.