package commons.graph.worker;
import commons.graph.model.GraphModelException;
public class ZoomIn extends EdgeWorker
{

private double magnification = 1.;
private double minimumoffset = 0.;

/**
 * Max must not be 0.
 * @param magnification value != 0
 */
public ZoomIn(double magnification, double minimumoffset)
{
   this.magnification = magnification;
   this.minimumoffset = minimumoffset;
}

public void work (String a, String b) throws GraphModelException
{
   double d = edges.distance(a, b);
   edges.setDistance(a, b, minimumoffset + d * magnification);
}

}
