Skip to content

Commit

Permalink
use the default class for events
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Nov 16, 2023
1 parent 19a461a commit d78336c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/IGC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Geometry>) => {
(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]);
Expand Down
8 changes: 4 additions & 4 deletions src/layer/RLayerBaseVector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export interface RLayerBaseVectorProps extends RLayerProps {
*/
onAddFeature?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<FeatureLike>
e: VectorSourceEvent

Check failure on line 72 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 72 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 72 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).
) => boolean | void;
/**
* Called upon initiating the request for new features
*/
onFeaturesLoadStart?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<FeatureLike>
e: VectorSourceEvent

Check failure on line 79 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 79 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 79 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).
) => boolean | void;
/**
* Called when the external features have been loaded from `url`
Expand All @@ -87,14 +87,14 @@ export interface RLayerBaseVectorProps extends RLayerProps {
*/
onFeaturesLoadEnd?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<FeatureLike>
e: VectorSourceEvent

Check failure on line 90 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 90 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 90 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).
) => boolean | void;
/**
* Called on failure while loading features
*/
onFeaturesLoadError?: (
this: RLayerBaseVector<RLayerBaseVectorProps>,
e: VectorSourceEvent<FeatureLike>
e: VectorSourceEvent

Check failure on line 97 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.10)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 97 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.11)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).

Check failure on line 97 in src/layer/RLayerBaseVector.tsx

View workflow job for this annotation

GitHub Actions / ol-versions (6.12)

Generic type 'VectorSourceEvent<Geometry>' requires 1 type argument(s).
) => boolean | void;
/** onPointerMove handler for all loaded features */
onPointerMove?: (
Expand Down

0 comments on commit d78336c

Please sign in to comment.