lnvis

nanovg lightning network visualizer
git clone git://jb55.com/lnvis
Log | Files | Refs | README | LICENSE

commit bda11140713be2f34376c48d57604c1b30c4abba
parent f55fbdf3edb180f0aaf1ca4cf4eab0c6f1b057a1
Author: William Casarin <jb55@jb55.com>
Date:   Sat,  4 Aug 2018 15:00:13 -0700

kill velocity when dragging

Diffstat:
Mupdate.c | 6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/update.c b/update.c @@ -29,10 +29,6 @@ void update(struct ln *ln, double dt) // click detection if (ln->clicked) { struct node *hit = hit_node(ln); - - if (hit != NULL) - printf("hit %s\n", hit->alias); - ln->drag_target = hit; } @@ -44,6 +40,8 @@ void update(struct ln *ln, double dt) if (ln->mdown && ln->drag_target) { ln->drag_target->x = ln->mx; ln->drag_target->y = ln->my; + ln->drag_target->vx = 0; + ln->drag_target->vy = 0; } u32 i;