Changed number of segments for map pointer

This commit is contained in:
Mitchell McCaffrey 2020-08-12 11:03:37 +10:00
parent 68f5a409e2
commit 94ff07a2ca

View File

@ -176,10 +176,7 @@ export function Trail({ position, size, duration, segments }) {
} }
} }
if (expired > 0) { if (expired > 0) {
pointsRef.current = pointsRef.current.slice( pointsRef.current = pointsRef.current.slice(expired);
expired,
pointsRef.current.length
);
} }
if (trailRef.current) { if (trailRef.current) {
trailRef.current.getLayer().draw(); trailRef.current.getLayer().draw();
@ -229,7 +226,7 @@ Trail.defaultProps = {
// Duration of each point in milliseconds // Duration of each point in milliseconds
duration: 200, duration: 200,
// Number of segments in the trail, resampled from the points // Number of segments in the trail, resampled from the points
segments: 50, segments: 20,
}; };
export function getRelativePointerPosition(node) { export function getRelativePointerPosition(node) {