Clean up FutureSplash code a bit.

This commit is contained in:
Jürg Lehni 2015-03-07 11:05:57 +01:00
parent c847dd2cc0
commit 5df30c4a7a

View file

@ -80,14 +80,12 @@
if (!point.fixed && location.distance < size.height / 4) { if (!point.fixed && location.distance < size.height / 4) {
var y = event.point.y; var y = event.point.y;
point.y += (y - point.y) / 6; point.y += (y - point.y) / 6;
if (segment.previous && !segment.previous.point.fixed) { var previous = segment.previous && segment.previous.point;
var previous = segment.previous.point; var next = segment.next && segment.next.point;
if (previous && !previous.fixed)
previous.y += (y - previous.y) / 24; previous.y += (y - previous.y) / 24;
} if (next && !next.fixed)
if (segment.next && !segment.next.point.fixed) {
var next = segment.next.point;
next.y += (y - next.y) / 24; next.y += (y - next.y) / 24;
}
} }
} }