src/Tools/Graphview/layout.scala
changeset 59304 848e27e4ac37
parent 59302 4d985afc0565
child 59305 b5e33012180e
equal deleted inserted replaced
59303:15cd9bcd6ddb 59304:848e27e4ac37
   322 
   322 
   323   def translate_vertex(v: Layout.Vertex, dx: Double, dy: Double): Layout =
   323   def translate_vertex(v: Layout.Vertex, dx: Double, dy: Double): Layout =
   324   {
   324   {
   325     if ((dx == 0.0 && dy == 0.0) || !output_graph.defined(v)) this
   325     if ((dx == 0.0 && dy == 0.0) || !output_graph.defined(v)) this
   326     else {
   326     else {
   327       val output_graph1 = output_graph.map_node(v, p => Layout.Point(p.x + dy, p.y + dy))
   327       val output_graph1 = output_graph.map_node(v, p => Layout.Point(p.x + dx, p.y + dy))
   328       new Layout(metrics, input_graph, output_graph1)
   328       new Layout(metrics, input_graph, output_graph1)
   329     }
   329     }
   330   }
   330   }
   331 
   331 
   332 
   332