From 334a0f6e487e0a39e3329e339c8750ae91ac03f9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 31 Dec 2013 03:11:02 +0000 Subject: FDGL: Tweak variables for better directional layout. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5235 a436a847-0d15-0410-975c-d299462d15a1 --- src/Canvas.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 45835e0..ca71017 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -765,10 +765,10 @@ GanvCanvasImpl::layout_iteration() gboolean GanvCanvasImpl::layout_calculate(double dur, bool update) { - static const double SPRING_K = 28.0; + static const double SPRING_K = 48.0; // A light directional force to push sources to the top left - static const double DIR_MAGNITUDE = -1200.0; + static const double DIR_MAGNITUDE = -2800.0; Vector dir = { 0.0, 0.0 }; switch (_gcanvas->direction) { case GANV_DIRECTION_RIGHT: dir.x = DIR_MAGNITUDE; break; @@ -798,7 +798,7 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) const Vector tpos = { coords.x1, coords.y1 }; const Vector hpos = { coords.x2, coords.y2 }; - apply_force(tail, head, edge_force(dir, hpos, tpos, 0.0001, SPRING_K)); + apply_force(tail, head, edge_force(dir, hpos, tpos, 0.000000000001, SPRING_K)); } // Calculate repelling forces between nodes @@ -838,7 +838,7 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) const Vector mouth = { -100000.0, -100000.0 }; node->impl->force = vec_add( node->impl->force, - tide_force(mouth, reg.pos, 10000000000000.0)); + tide_force(mouth, reg.pos, 1000000000000.0)); FOREACH_ITEM(_items, j) { if (i == j || (!GANV_IS_MODULE(*i) && !GANV_IS_CIRCLE(*i))) { -- cgit v1.2.1