diff --git a/fd/Graph.lua b/fd/Graph.lua index 0a2f024..a58b801 100644 --- a/fd/Graph.lua +++ b/fd/Graph.lua @@ -11,8 +11,6 @@ function Graph.new() local edges = {}; local edgeIDs = 0; - local attractionPoint; - local minX, maxX, minY, maxY; -- ------------------------------------------------ @@ -90,18 +88,6 @@ function Graph.new() self:removeEdges( node ); end - --- - -- Adds a global attraction point. - -- This point won't show up in the graph itself and can not be interacted - -- with. Instead it only has the purpose to attract all nodes in the graph. - -- This can be useful if you have unconnected nodes and want to prevent - -- them from floating away. - -- @param ncx - The x-coordinate of the attraction point. - -- @param ncy - The y-coordinate of the attraction point. - function self:addAttractionPoint( ncx, ncy ) - attractionPoint = Node.new( 'center', ncx, ncy ); - end - --- -- Adds a new edge between two nodes. -- @param origin - The node from which the edge originates. @@ -144,10 +130,6 @@ function Graph.new() resetBoundaries(); for _, nodeA in pairs( nodes ) do - if attractionPoint then - nodeA:attractTo( attractionPoint ); - end - if not nodeA:isAnchor() then for _, nodeB in pairs( nodes ) do if nodeA ~= nodeB then