From d78336c66497f65f7c37a34d4c75c41c19669c31 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Thu, 16 Nov 2023 18:03:03 +0100 Subject: [PATCH] use the default class for events --- examples/IGC.tsx | 2 +- src/layer/RLayerBaseVector.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/IGC.tsx b/examples/IGC.tsx index dcc83730..258f48e7 100644 --- a/examples/IGC.tsx +++ b/examples/IGC.tsx @@ -145,7 +145,7 @@ export default function IGCComp(): JSX.Element { onAddFeature={useCallback( // This useCallback transforms this function to a constant value // None of its dependencies change after initialization - (e: VectorSourceEvent) => { + (e: VectorSourceEvent) => { const geometry = e.feature.getGeometry() as LineString; flight.start = Math.min(flight.start, geometry.getFirstCoordinate()[2]); flight.stop = Math.max(flight.stop, geometry.getLastCoordinate()[2]); diff --git a/src/layer/RLayerBaseVector.tsx b/src/layer/RLayerBaseVector.tsx index 72350794..8136c637 100644 --- a/src/layer/RLayerBaseVector.tsx +++ b/src/layer/RLayerBaseVector.tsx @@ -69,14 +69,14 @@ export interface RLayerBaseVectorProps extends RLayerProps { */ onAddFeature?: ( this: RLayerBaseVector, - e: VectorSourceEvent + e: VectorSourceEvent ) => boolean | void; /** * Called upon initiating the request for new features */ onFeaturesLoadStart?: ( this: RLayerBaseVector, - e: VectorSourceEvent + e: VectorSourceEvent ) => boolean | void; /** * Called when the external features have been loaded from `url` @@ -87,14 +87,14 @@ export interface RLayerBaseVectorProps extends RLayerProps { */ onFeaturesLoadEnd?: ( this: RLayerBaseVector, - e: VectorSourceEvent + e: VectorSourceEvent ) => boolean | void; /** * Called on failure while loading features */ onFeaturesLoadError?: ( this: RLayerBaseVector, - e: VectorSourceEvent + e: VectorSourceEvent ) => boolean | void; /** onPointerMove handler for all loaded features */ onPointerMove?: (