}
return result;
}
// Scale all the nodes to fit within the indicated region
LayoutScaler scaler = new LayoutScaler(layoutNodes, locations);
double scaleView = scaleWithMargin(scaler, viewport);
Point2dUtils.Translater translater =
Point2dUtils.newScaleTranslater(scaleView, scaleView);
return Point2dUtils.translateNodes(layoutNodes, locations, translater);
}