}
NodeData nodeFrom = edge.getSource();
NodeData nodeTo = edge.getTarget();
//Edge weight
GraphLimits limits = vizModel.getLimits();
float w;
if (edge.getEdge() instanceof MetaEdge) {
float weightRatio;
if (limits.getMinMetaWeight() == limits.getMaxMetaWeight()) {
weightRatio = Edge2dModel.WEIGHT_MINIMUM / limits.getMinMetaWeight();
} else {
weightRatio = Math.abs((Edge2dModel.WEIGHT_MAXIMUM - Edge2dModel.WEIGHT_MINIMUM) / (limits.getMaxMetaWeight() - limits.getMinMetaWeight()));
}
float edgeScale = vizModel.getEdgeScale() * vizModel.getMetaEdgeScale();
w = weight;
w = ((w - limits.getMinMetaWeight()) * weightRatio + Edge2dModel.WEIGHT_MINIMUM) * edgeScale;
} else {
float weightRatio;
if (limits.getMinWeight() == limits.getMaxWeight()) {
weightRatio = Edge2dModel.WEIGHT_MINIMUM / limits.getMinWeight();
} else {
weightRatio = Math.abs((Edge2dModel.WEIGHT_MAXIMUM - Edge2dModel.WEIGHT_MINIMUM) / (limits.getMaxWeight() - limits.getMinWeight()));
}
float edgeScale = vizModel.getEdgeScale();
w = weight;
w = ((w - limits.getMinWeight()) * weightRatio + Edge2dModel.WEIGHT_MINIMUM) * edgeScale;
}
//
//Edge size
float arrowWidth = ARROW_WIDTH * w * 2f;