turn off zoom to fit for dynamic size
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user