@lugg/maps 1.0.0-beta.4 → 1.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/android/src/main/java/com/luggmaps/LuggCalloutView.kt +4 -2
  2. package/android/src/main/java/com/luggmaps/LuggCalloutViewManager.kt +4 -3
  3. package/android/src/main/java/com/luggmaps/LuggMapView.kt +40 -0
  4. package/android/src/main/java/com/luggmaps/LuggMapViewManager.kt +31 -0
  5. package/android/src/main/java/com/luggmaps/LuggMarkerView.kt +23 -0
  6. package/android/src/main/java/com/luggmaps/LuggMarkerViewManager.kt +13 -0
  7. package/android/src/main/java/com/luggmaps/core/GoogleMapProvider.kt +166 -21
  8. package/android/src/main/java/com/luggmaps/core/MapProviderDelegate.kt +5 -0
  9. package/android/src/main/java/com/luggmaps/extensions/ViewExtensions.kt +11 -0
  10. package/ios/LuggCalloutView.h +1 -1
  11. package/ios/LuggCalloutView.mm +21 -11
  12. package/ios/LuggMapView.mm +41 -2
  13. package/ios/LuggMarkerView.h +3 -0
  14. package/ios/LuggMarkerView.mm +23 -0
  15. package/ios/core/AppleMapProvider.mm +236 -16
  16. package/ios/core/GoogleMapProvider.mm +91 -18
  17. package/ios/core/MapProviderDelegate.h +8 -1
  18. package/lib/module/MapProvider.web.js +4 -1
  19. package/lib/module/MapProvider.web.js.map +1 -1
  20. package/lib/module/MapView.js +12 -1
  21. package/lib/module/MapView.js.map +1 -1
  22. package/lib/module/MapView.web.js +21 -18
  23. package/lib/module/MapView.web.js.map +1 -1
  24. package/lib/module/components/Circle.web.js +3 -3
  25. package/lib/module/components/Circle.web.js.map +1 -1
  26. package/lib/module/components/GeoJson.js +3 -3
  27. package/lib/module/components/GeoJson.js.map +1 -1
  28. package/lib/module/components/GroundOverlay.web.js +3 -3
  29. package/lib/module/components/GroundOverlay.web.js.map +1 -1
  30. package/lib/module/components/Marker.js +17 -3
  31. package/lib/module/components/Marker.js.map +1 -1
  32. package/lib/module/components/Marker.web.js +23 -10
  33. package/lib/module/components/Marker.web.js.map +1 -1
  34. package/lib/module/components/Polygon.web.js +3 -3
  35. package/lib/module/components/Polygon.web.js.map +1 -1
  36. package/lib/module/components/Polyline.web.js +6 -12
  37. package/lib/module/components/Polyline.web.js.map +1 -1
  38. package/lib/module/components/TileOverlay.web.js +3 -3
  39. package/lib/module/components/TileOverlay.web.js.map +1 -1
  40. package/lib/module/components/index.js.map +1 -1
  41. package/lib/module/fabric/LuggCalloutViewNativeComponent.ts +1 -1
  42. package/lib/module/fabric/LuggMapViewNativeComponent.ts +9 -1
  43. package/lib/module/fabric/LuggMarkerViewNativeComponent.ts +14 -2
  44. package/lib/module/index.js.map +1 -1
  45. package/lib/typescript/src/MapProvider.web.d.ts +3 -2
  46. package/lib/typescript/src/MapProvider.web.d.ts.map +1 -1
  47. package/lib/typescript/src/MapView.d.ts +1 -1
  48. package/lib/typescript/src/MapView.d.ts.map +1 -1
  49. package/lib/typescript/src/MapView.types.d.ts +36 -1
  50. package/lib/typescript/src/MapView.types.d.ts.map +1 -1
  51. package/lib/typescript/src/MapView.web.d.ts +1 -1
  52. package/lib/typescript/src/MapView.web.d.ts.map +1 -1
  53. package/lib/typescript/src/components/Circle.web.d.ts +1 -1
  54. package/lib/typescript/src/components/Circle.web.d.ts.map +1 -1
  55. package/lib/typescript/src/components/GeoJson.d.ts +2 -1
  56. package/lib/typescript/src/components/GeoJson.d.ts.map +1 -1
  57. package/lib/typescript/src/components/GroundOverlay.web.d.ts +1 -1
  58. package/lib/typescript/src/components/GroundOverlay.web.d.ts.map +1 -1
  59. package/lib/typescript/src/components/Marker.d.ts +6 -3
  60. package/lib/typescript/src/components/Marker.d.ts.map +1 -1
  61. package/lib/typescript/src/components/Marker.types.d.ts +14 -5
  62. package/lib/typescript/src/components/Marker.types.d.ts.map +1 -1
  63. package/lib/typescript/src/components/Marker.web.d.ts +3 -2
  64. package/lib/typescript/src/components/Marker.web.d.ts.map +1 -1
  65. package/lib/typescript/src/components/Polygon.web.d.ts +1 -1
  66. package/lib/typescript/src/components/Polygon.web.d.ts.map +1 -1
  67. package/lib/typescript/src/components/Polyline.web.d.ts +1 -1
  68. package/lib/typescript/src/components/Polyline.web.d.ts.map +1 -1
  69. package/lib/typescript/src/components/TileOverlay.web.d.ts +1 -1
  70. package/lib/typescript/src/components/TileOverlay.web.d.ts.map +1 -1
  71. package/lib/typescript/src/components/index.d.ts +1 -1
  72. package/lib/typescript/src/components/index.d.ts.map +1 -1
  73. package/lib/typescript/src/fabric/LuggCalloutViewNativeComponent.d.ts +1 -1
  74. package/lib/typescript/src/fabric/LuggMapViewNativeComponent.d.ts +6 -1
  75. package/lib/typescript/src/fabric/LuggMapViewNativeComponent.d.ts.map +1 -1
  76. package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts +8 -1
  77. package/lib/typescript/src/fabric/LuggMarkerViewNativeComponent.d.ts.map +1 -1
  78. package/lib/typescript/src/index.d.ts +3 -3
  79. package/lib/typescript/src/index.d.ts.map +1 -1
  80. package/lib/typescript/src/index.web.d.ts +1 -1
  81. package/lib/typescript/src/index.web.d.ts.map +1 -1
  82. package/lib/typescript/src/types.d.ts +0 -4
  83. package/lib/typescript/src/types.d.ts.map +1 -1
  84. package/package.json +1 -1
  85. package/src/MapProvider.web.tsx +5 -3
  86. package/src/MapView.tsx +12 -1
  87. package/src/MapView.types.ts +118 -1
  88. package/src/MapView.web.tsx +378 -345
  89. package/src/components/Circle.web.tsx +81 -79
  90. package/src/components/GeoJson.tsx +3 -3
  91. package/src/components/GroundOverlay.web.tsx +65 -69
  92. package/src/components/Marker.tsx +28 -5
  93. package/src/components/Marker.types.ts +15 -5
  94. package/src/components/Marker.web.tsx +196 -150
  95. package/src/components/Polygon.web.tsx +93 -89
  96. package/src/components/Polyline.web.tsx +235 -235
  97. package/src/components/TileOverlay.web.tsx +83 -81
  98. package/src/components/index.ts +1 -0
  99. package/src/fabric/LuggCalloutViewNativeComponent.ts +1 -1
  100. package/src/fabric/LuggMapViewNativeComponent.ts +9 -1
  101. package/src/fabric/LuggMarkerViewNativeComponent.ts +14 -2
  102. package/src/index.ts +6 -1
  103. package/src/index.web.ts +3 -0
  104. package/src/types.ts +0 -5
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
1
+ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
2
2
  import { useMapContext } from '../MapProvider.web';
3
3
  import type { PolylineProps, PolylineEasing } from './Polyline.types';
4
4
 
@@ -51,270 +51,270 @@ const getGradientColor = (colors: string[], position: number): string => {
51
51
  return interpolateColor(colors[index]!, colors[index + 1]!, t);
52
52
  };
53
53
 
54
- export const Polyline = ({
55
- coordinates,
56
- strokeColors,
57
- strokeWidth = 1,
58
- animated,
59
- animatedOptions,
60
- zIndex,
61
- }: PolylineProps) => {
62
- const resolvedZIndex = zIndex ?? (animated ? 1 : 0);
63
- const { map, isDragging } = useMapContext();
64
-
65
- const { duration, easing, trailLength, delay } = useMemo(
66
- () => ({
67
- duration: animatedOptions?.duration ?? DEFAULT_DURATION,
68
- easing: animatedOptions?.easing ?? 'linear',
69
- trailLength: Math.max(
70
- 0.01,
71
- Math.min(1, animatedOptions?.trailLength ?? 1)
72
- ),
73
- delay: animatedOptions?.delay ?? 0,
74
- }),
75
- [
76
- animatedOptions?.duration,
77
- animatedOptions?.easing,
78
- animatedOptions?.trailLength,
79
- animatedOptions?.delay,
80
- ]
81
- );
82
- const polylinesRef = useRef<google.maps.Polyline[]>([]);
83
- const animationRef = useRef<number>(0);
84
- const isPausedRef = useRef(false);
85
-
86
- const colors = useMemo(
87
- () =>
88
- strokeColors && strokeColors.length > 0
89
- ? (strokeColors as string[])
90
- : ['#000000'],
91
- [strokeColors]
92
- );
93
-
94
- const hasGradient = colors.length > 1;
95
-
96
- // Refs for animation loop access
97
- const propsRef = useRef({
98
- map,
99
- colors,
100
- strokeWidth,
101
- hasGradient,
102
- zIndex: resolvedZIndex,
103
- });
104
- const [mapReady, setMapReady] = useState(!!map);
105
-
106
- useEffect(() => {
107
- propsRef.current = {
54
+ export const Polyline = memo(
55
+ ({
56
+ coordinates,
57
+ strokeColors,
58
+ strokeWidth = 1,
59
+ animated,
60
+ animatedOptions,
61
+ zIndex,
62
+ }: PolylineProps) => {
63
+ const resolvedZIndex = zIndex ?? (animated ? 1 : 0);
64
+ const { map, isDraggingRef } = useMapContext();
65
+
66
+ const { duration, easing, trailLength, delay } = useMemo(
67
+ () => ({
68
+ duration: animatedOptions?.duration ?? DEFAULT_DURATION,
69
+ easing: animatedOptions?.easing ?? 'linear',
70
+ trailLength: Math.max(
71
+ 0.01,
72
+ Math.min(1, animatedOptions?.trailLength ?? 1)
73
+ ),
74
+ delay: animatedOptions?.delay ?? 0,
75
+ }),
76
+ [
77
+ animatedOptions?.duration,
78
+ animatedOptions?.easing,
79
+ animatedOptions?.trailLength,
80
+ animatedOptions?.delay,
81
+ ]
82
+ );
83
+ const polylinesRef = useRef<google.maps.Polyline[]>([]);
84
+ const animationRef = useRef<number>(0);
85
+
86
+ const colors = useMemo(
87
+ () =>
88
+ strokeColors && strokeColors.length > 0
89
+ ? (strokeColors as string[])
90
+ : ['#000000'],
91
+ [strokeColors]
92
+ );
93
+
94
+ const hasGradient = colors.length > 1;
95
+
96
+ // Refs for animation loop access
97
+ const propsRef = useRef({
108
98
  map,
109
99
  colors,
110
100
  strokeWidth,
111
101
  hasGradient,
112
102
  zIndex: resolvedZIndex,
113
- };
114
- if (map && !mapReady) setMapReady(true);
115
- }, [map, colors, strokeWidth, hasGradient, resolvedZIndex, mapReady]);
116
-
117
- const updatePath = useCallback((path: google.maps.LatLngLiteral[]) => {
118
- const {
119
- map: currentMap,
120
- colors: currentColors,
121
- strokeWidth: currentStrokeWidth,
122
- hasGradient: currentHasGradient,
123
- zIndex: currentZIndex,
124
- } = propsRef.current;
125
- const existing = polylinesRef.current;
126
- if (!currentMap) return;
127
-
128
- if (path.length < 2) {
129
- existing.forEach((p) => p.setMap(null));
130
- existing.length = 0;
131
- return;
132
- }
133
-
134
- const neededSegments = currentHasGradient ? path.length - 1 : 1;
135
-
136
- // Update or create segments
137
- for (let i = 0; i < neededSegments; i++) {
138
- const segmentPath = currentHasGradient ? [path[i]!, path[i + 1]!] : path;
139
- const color = currentHasGradient
140
- ? getGradientColor(currentColors, i / (path.length - 1))
141
- : currentColors[0]!;
142
-
143
- const segment = existing[i];
144
- if (segment) {
145
- segment.setPath(segmentPath);
146
- segment.setOptions({ strokeColor: color });
147
- } else {
148
- existing.push(
149
- new google.maps.Polyline({
150
- path: segmentPath,
151
- strokeColor: color,
152
- strokeWeight: currentStrokeWidth,
153
- strokeOpacity: 1,
154
- zIndex: currentZIndex,
155
- map: currentMap,
156
- })
157
- );
103
+ });
104
+ const [mapReady, setMapReady] = useState(!!map);
105
+
106
+ useEffect(() => {
107
+ propsRef.current = {
108
+ map,
109
+ colors,
110
+ strokeWidth,
111
+ hasGradient,
112
+ zIndex: resolvedZIndex,
113
+ };
114
+ if (map && !mapReady) setMapReady(true);
115
+ }, [map, colors, strokeWidth, hasGradient, resolvedZIndex, mapReady]);
116
+
117
+ const updatePath = useCallback((path: google.maps.LatLngLiteral[]) => {
118
+ const {
119
+ map: currentMap,
120
+ colors: currentColors,
121
+ strokeWidth: currentStrokeWidth,
122
+ hasGradient: currentHasGradient,
123
+ zIndex: currentZIndex,
124
+ } = propsRef.current;
125
+ const existing = polylinesRef.current;
126
+ if (!currentMap) return;
127
+
128
+ if (path.length < 2) {
129
+ existing.forEach((p) => p.setMap(null));
130
+ existing.length = 0;
131
+ return;
158
132
  }
159
- }
160
-
161
- // Remove extra segments
162
- for (let i = neededSegments; i < existing.length; i++) {
163
- existing[i]?.setMap(null);
164
- }
165
- existing.length = neededSegments;
166
- }, []);
167
-
168
- // Cleanup on unmount
169
- useEffect(() => {
170
- const polylines = polylinesRef.current;
171
- return () => {
172
- cancelAnimationFrame(animationRef.current);
173
- polylines.forEach((p) => p.setMap(null));
174
- };
175
- }, []);
176
-
177
- // Pause/resume animation during drag
178
- useEffect(() => {
179
- isPausedRef.current = isDragging;
180
- }, [isDragging]);
181
133
 
182
- // Main effect
183
- useEffect(() => {
184
- if (!propsRef.current.map || coordinates.length === 0) return;
134
+ const neededSegments = currentHasGradient ? path.length - 1 : 1;
135
+
136
+ // Update or create segments
137
+ for (let i = 0; i < neededSegments; i++) {
138
+ const segmentPath = currentHasGradient
139
+ ? [path[i]!, path[i + 1]!]
140
+ : path;
141
+ const color = currentHasGradient
142
+ ? getGradientColor(currentColors, i / (path.length - 1))
143
+ : currentColors[0]!;
144
+
145
+ const segment = existing[i];
146
+ if (segment) {
147
+ segment.setPath(segmentPath);
148
+ segment.setOptions({ strokeColor: color });
149
+ } else {
150
+ existing.push(
151
+ new google.maps.Polyline({
152
+ path: segmentPath,
153
+ strokeColor: color,
154
+ strokeWeight: currentStrokeWidth,
155
+ strokeOpacity: 1,
156
+ zIndex: currentZIndex,
157
+ map: currentMap,
158
+ })
159
+ );
160
+ }
161
+ }
185
162
 
186
- const fullPath = coordinates.map((c) => ({
187
- lat: c.latitude,
188
- lng: c.longitude,
189
- }));
163
+ // Remove extra segments
164
+ for (let i = neededSegments; i < existing.length; i++) {
165
+ existing[i]?.setMap(null);
166
+ }
167
+ existing.length = neededSegments;
168
+ }, []);
169
+
170
+ // Cleanup on unmount
171
+ useEffect(() => {
172
+ const polylines = polylinesRef.current;
173
+ return () => {
174
+ cancelAnimationFrame(animationRef.current);
175
+ polylines.forEach((p) => p.setMap(null));
176
+ };
177
+ }, []);
178
+
179
+ // Main effect
180
+ useEffect(() => {
181
+ if (!propsRef.current.map || coordinates.length === 0) return;
182
+
183
+ const fullPath = coordinates.map((c) => ({
184
+ lat: c.latitude,
185
+ lng: c.longitude,
186
+ }));
190
187
 
191
- cancelAnimationFrame(animationRef.current);
188
+ cancelAnimationFrame(animationRef.current);
192
189
 
193
- if (!animated) {
194
- updatePath(fullPath);
195
- return;
196
- }
190
+ if (!animated) {
191
+ updatePath(fullPath);
192
+ return;
193
+ }
197
194
 
198
- const totalPoints = fullPath.length;
199
- const useTrailMode = trailLength < 1;
200
- const renderMax = useTrailMode ? 1 : 2;
201
- const cycleMax = useTrailMode ? 1 : 2.15;
195
+ const totalPoints = fullPath.length;
196
+ const useTrailMode = trailLength < 1;
197
+ const renderMax = useTrailMode ? 1 : 2;
198
+ const cycleMax = useTrailMode ? 1 : 2.15;
202
199
 
203
- let startTime: number | null = null;
204
- let delayRemaining = delay;
200
+ let startTime: number | null = null;
201
+ let delayRemaining = delay;
205
202
 
206
- let pausedAt: number | null = null;
203
+ let pausedAt: number | null = null;
207
204
 
208
- const animate = (time: number) => {
209
- if (isPausedRef.current) {
210
- if (pausedAt === null) pausedAt = time;
211
- animationRef.current = requestAnimationFrame(animate);
212
- return;
213
- }
205
+ const animate = (time: number) => {
206
+ if (isDraggingRef.current) {
207
+ if (pausedAt === null) pausedAt = time;
208
+ animationRef.current = requestAnimationFrame(animate);
209
+ return;
210
+ }
214
211
 
215
- if (pausedAt !== null) {
216
- if (startTime !== null) {
217
- startTime += time - pausedAt;
212
+ if (pausedAt !== null) {
213
+ if (startTime !== null) {
214
+ startTime += time - pausedAt;
215
+ }
216
+ pausedAt = null;
218
217
  }
219
- pausedAt = null;
220
- }
221
218
 
222
- if (startTime === null) {
223
- startTime = time;
224
- }
219
+ if (startTime === null) {
220
+ startTime = time;
221
+ }
225
222
 
226
- const elapsed = time - startTime;
223
+ const elapsed = time - startTime;
227
224
 
228
- if (delayRemaining > 0) {
229
- if (elapsed < delayRemaining) {
230
- animationRef.current = requestAnimationFrame(animate);
231
- return;
225
+ if (delayRemaining > 0) {
226
+ if (elapsed < delayRemaining) {
227
+ animationRef.current = requestAnimationFrame(animate);
228
+ return;
229
+ }
230
+ startTime = time - (elapsed - delayRemaining);
231
+ delayRemaining = 0;
232
232
  }
233
- startTime = time - (elapsed - delayRemaining);
234
- delayRemaining = 0;
235
- }
236
233
 
237
- const rawProgress = (time - startTime) / duration;
234
+ const rawProgress = (time - startTime) / duration;
238
235
 
239
- if (rawProgress >= cycleMax) {
240
- delayRemaining = delay;
241
- startTime = time;
242
- }
236
+ if (rawProgress >= cycleMax) {
237
+ delayRemaining = delay;
238
+ startTime = time;
239
+ }
243
240
 
244
- const clampedProgress = Math.min(rawProgress, renderMax);
245
- const easedProgress =
246
- applyEasing(clampedProgress / renderMax, easing) * renderMax;
241
+ const clampedProgress = Math.min(rawProgress, renderMax);
242
+ const easedProgress =
243
+ applyEasing(clampedProgress / renderMax, easing) * renderMax;
247
244
 
248
- let startIdx: number;
249
- let endIdx: number;
245
+ let startIdx: number;
246
+ let endIdx: number;
250
247
 
251
- if (useTrailMode) {
252
- endIdx = easedProgress * totalPoints;
253
- startIdx = Math.max(0, endIdx - trailLength * totalPoints);
254
- } else {
255
- startIdx = easedProgress <= 1 ? 0 : (easedProgress - 1) * totalPoints;
256
- endIdx = easedProgress <= 1 ? easedProgress * totalPoints : totalPoints;
257
- }
248
+ if (useTrailMode) {
249
+ endIdx = easedProgress * totalPoints;
250
+ startIdx = Math.max(0, endIdx - trailLength * totalPoints);
251
+ } else {
252
+ startIdx = easedProgress <= 1 ? 0 : (easedProgress - 1) * totalPoints;
253
+ endIdx =
254
+ easedProgress <= 1 ? easedProgress * totalPoints : totalPoints;
255
+ }
258
256
 
259
- const partialPath: google.maps.LatLngLiteral[] = [];
260
- const startFloor = Math.floor(startIdx);
261
- const endFloor = Math.floor(endIdx);
262
-
263
- // Start point (interpolated)
264
- if (startFloor < totalPoints) {
265
- const frac = startIdx - startFloor;
266
- const from = fullPath[startFloor]!;
267
- const to = fullPath[Math.min(startFloor + 1, totalPoints - 1)]!;
268
- partialPath.push(
269
- frac > 0
270
- ? {
271
- lat: from.lat + (to.lat - from.lat) * frac,
272
- lng: from.lng + (to.lng - from.lng) * frac,
273
- }
274
- : from
275
- );
276
- }
257
+ const partialPath: google.maps.LatLngLiteral[] = [];
258
+ const startFloor = Math.floor(startIdx);
259
+ const endFloor = Math.floor(endIdx);
260
+
261
+ // Start point (interpolated)
262
+ if (startFloor < totalPoints) {
263
+ const frac = startIdx - startFloor;
264
+ const from = fullPath[startFloor]!;
265
+ const to = fullPath[Math.min(startFloor + 1, totalPoints - 1)]!;
266
+ partialPath.push(
267
+ frac > 0
268
+ ? {
269
+ lat: from.lat + (to.lat - from.lat) * frac,
270
+ lng: from.lng + (to.lng - from.lng) * frac,
271
+ }
272
+ : from
273
+ );
274
+ }
277
275
 
278
- // Middle points
279
- for (
280
- let i = startFloor + 1;
281
- i <= Math.min(endFloor, totalPoints - 1);
282
- i++
283
- ) {
284
- partialPath.push(fullPath[i]!);
285
- }
276
+ // Middle points
277
+ for (
278
+ let i = startFloor + 1;
279
+ i <= Math.min(endFloor, totalPoints - 1);
280
+ i++
281
+ ) {
282
+ partialPath.push(fullPath[i]!);
283
+ }
286
284
 
287
- // End point (interpolated)
288
- if (endFloor < totalPoints - 1) {
289
- const frac = endIdx - endFloor;
290
- const from = fullPath[endFloor]!;
291
- const to = fullPath[endFloor + 1]!;
292
- if (frac > 0) {
293
- partialPath.push({
294
- lat: from.lat + (to.lat - from.lat) * frac,
295
- lng: from.lng + (to.lng - from.lng) * frac,
296
- });
285
+ // End point (interpolated)
286
+ if (endFloor < totalPoints - 1) {
287
+ const frac = endIdx - endFloor;
288
+ const from = fullPath[endFloor]!;
289
+ const to = fullPath[endFloor + 1]!;
290
+ if (frac > 0) {
291
+ partialPath.push({
292
+ lat: from.lat + (to.lat - from.lat) * frac,
293
+ lng: from.lng + (to.lng - from.lng) * frac,
294
+ });
295
+ }
297
296
  }
298
- }
299
297
 
300
- updatePath(partialPath);
298
+ updatePath(partialPath);
299
+ animationRef.current = requestAnimationFrame(animate);
300
+ };
301
+
301
302
  animationRef.current = requestAnimationFrame(animate);
302
- };
303
303
 
304
- animationRef.current = requestAnimationFrame(animate);
304
+ return () => cancelAnimationFrame(animationRef.current);
305
+ }, [
306
+ coordinates,
307
+ animated,
308
+ duration,
309
+ easing,
310
+ trailLength,
311
+ delay,
312
+ hasGradient,
313
+ updatePath,
314
+ mapReady,
315
+ isDraggingRef,
316
+ ]);
305
317
 
306
- return () => cancelAnimationFrame(animationRef.current);
307
- }, [
308
- coordinates,
309
- animated,
310
- duration,
311
- easing,
312
- trailLength,
313
- delay,
314
- hasGradient,
315
- updatePath,
316
- mapReady,
317
- ]);
318
-
319
- return null;
320
- };
318
+ return null;
319
+ }
320
+ );