From 94ff07a2cac72f5dbf4e5d9cf71b5813a1370b7c Mon Sep 17 00:00:00 2001 From: Mitchell McCaffrey Date: Wed, 12 Aug 2020 11:03:37 +1000 Subject: [PATCH] Changed number of segments for map pointer --- src/helpers/konva.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/helpers/konva.js b/src/helpers/konva.js index 5767d8c..bfa602d 100644 --- a/src/helpers/konva.js +++ b/src/helpers/konva.js @@ -176,10 +176,7 @@ export function Trail({ position, size, duration, segments }) { } } if (expired > 0) { - pointsRef.current = pointsRef.current.slice( - expired, - pointsRef.current.length - ); + pointsRef.current = pointsRef.current.slice(expired); } if (trailRef.current) { trailRef.current.getLayer().draw(); @@ -229,7 +226,7 @@ Trail.defaultProps = { // Duration of each point in milliseconds duration: 200, // Number of segments in the trail, resampled from the points - segments: 50, + segments: 20, }; export function getRelativePointerPosition(node) {