turn off zoom to fit for dynamic size

This commit is contained in:
Oliver Gorwits
2018-03-10 11:44:29 +00:00
parent 5d8475822b
commit 4169f4c200

View File

@@ -178,12 +178,12 @@ $.getJSON('[% uri_for('/ajax/data/device/netmap') %]?[% my_query %]', function(m
// about a second after render starts, zoom in a bit // about a second after render starts, zoom in a bit
if ('[% params.mapshow %]' == 'neighbors') { if ('[% params.mapshow %]' == 'neighbors') {
setTimeout(function() { setTimeout(function() {
if ('[% params.dynamicsize %]' == 'on') { //if ('[% params.dynamicsize %]' == 'on') {
graph.zoomToFit(); // graph.zoomToFit();
} else { //} else {
var node = graph.nodeDataById( graph['nd2']['centernode'] ); var node = graph.nodeDataById( graph['nd2']['centernode'] );
graph.zoomSmooth(node.x, node.y, node.radius * 125); graph.zoomSmooth(node.x, node.y, node.radius * 125);
} //}
}, 1500); }, 1500);
} }
}); // document.onReady }); // document.onReady