From 0af23f4638bbd87ccd886a988616effe58c73c4a Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 30 Jul 2015 18:01:08 +0300 Subject: client/model/graph: use eps, short for epsilon --- src/client/model/graph.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/model/graph.js b/src/client/model/graph.js index ab9b5902..f7affb93 100644 --- a/src/client/model/graph.js +++ b/src/client/model/graph.js @@ -645,6 +645,8 @@ function Graph(spec) { return Math.abs(a - b) < eps; } + var eps = 0.001; + /** * Do an attribute commit with x, y for the current layout */ @@ -662,7 +664,7 @@ function Graph(spec) { x = node.x, y = node.y; - if (close_to(db_x, x, 0.0001) && close_to(db_y, y, 0.0001)) { + if (close_to(db_x, x, eps) && close_to(db_y, y, eps)) { return; } node[x_key] = node.x; -- cgit v1.3.1