From c10ea8a68504cf922657554362bb8c2c80b5bff8 Mon Sep 17 00:00:00 2001 From: muerwre Date: Mon, 4 Mar 2019 16:46:25 +0700 Subject: [PATCH] Now we display lesser points on mobile --- src/modules/Poly.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/Poly.ts b/src/modules/Poly.ts index b69e378..523f6e0 100644 --- a/src/modules/Poly.ts +++ b/src/modules/Poly.ts @@ -6,6 +6,7 @@ import { ILatLng } from "$modules/Stickers"; import { InteractivePoly } from "$modules/InteractivePoly"; import { Arrows } from "$modules/Arrows"; import { KmMarks } from "$modules/KmMarks"; +import { isMobile } from "$utils/window"; interface Props { map: Map; @@ -23,7 +24,7 @@ export class Poly { this.poly = new InteractivePoly([], { color: 'url(#activePathGradient)', weight: 6, - maxMarkers: 100, + maxMarkers: isMobile() ? 20 : 100, smoothFactor: 3, }) .on('distancechange', this.onDistanceUpdate)