summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/InitialTemplate.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/InitialTemplate.lua')
-rw-r--r--Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/InitialTemplate.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/InitialTemplate.lua b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/InitialTemplate.lua
index 762717f64a1..ad315e7a660 100644
--- a/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/InitialTemplate.lua
+++ b/Master/texmf-dist/tex/generic/pgf/graphdrawing/lua/pgf/gd/force/jedi/base/InitialTemplate.lua
@@ -8,11 +8,11 @@
-- See the file doc/generic/pgf/licenses/LICENSE for more information
---- This is the parent class for initial layout algorithms. It provides a
--- constructor and methods stubs to be overwritten in the subclasses as well
+--- This is the parent class for initial layout algorithms. It provides a
+-- constructor and methods stubs to be overwritten in the subclasses as well
-- as placing vertices which are |desired at| a certain point.
--- Imports
+-- Imports
local lib = require "pgf.gd.lib"
local InitialTemplate = lib.class {}
@@ -21,14 +21,14 @@ local InitialTemplate = lib.class {}
function InitialTemplate:constructor()
self.vertices = self.vertices
self.options = self.options
- self.desired_vertices = self.desired_vertices
+ self.desired_vertices = self.desired_vertices
end
-- Method placing |desired at| vertices at the point they are desired
--
--- @params desired_vertices A table containing all the vertices where the
+-- @params desired_vertices A table containing all the vertices where the
-- |desired at| option is set.
---
+--
-- @return |placed| A boolean array stating if vertices have been placed yet
-- @return |centroid_x| The x-coordinate of the midpoint of all placed vertices
-- @return |centroid_y| The y-coordinate of the midpoint of all placed vertices
@@ -37,7 +37,7 @@ function InitialTemplate:desired(desired_vertices)
local placed = {}
local centroid_x, centroid_y = 0, 0
-
+
local size = 0
for v, da in pairs(desired_vertices) do
local p = v.pos
@@ -53,7 +53,7 @@ function InitialTemplate:desired(desired_vertices)
centroid_x = centroid_x / size
centroid_y = centroid_y / size
end
-
+
return placed, centroid_x, centroid_y
end