From c974a4d75e4eb4fbe0a03ce6f5f1c964b0eaeaf1 Mon Sep 17 00:00:00 2001 From: Tim Deubler Date: Mon, 25 Nov 2024 15:43:49 +0100 Subject: [PATCH] fixed type issues Signed-off-by: Tim Deubler --- packages/core/src/features/Feature.ts | 19 ----------------- .../editor/src/features/feature/Feature.ts | 21 +++++++++++++++++++ .../tools/turnrestriction/TurnRestriction.ts | 4 +++- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/packages/core/src/features/Feature.ts b/packages/core/src/features/Feature.ts index e35e73e4d..d24806169 100644 --- a/packages/core/src/features/Feature.ts +++ b/packages/core/src/features/Feature.ts @@ -113,25 +113,6 @@ export class Feature implements GeoJSONFeature void; - /** - * pointerleave event listener for internal use only - * @hidden - * @internal - */ - pointerleave: () => void; - /** - * pointerup event listener for internal use only - * @hidden - * @internal - */ - pointerup: () => void; - constructor(feature: GeoJSONFeature, prov?: FeatureProvider) { this.id = feature.id; diff --git a/packages/editor/src/features/feature/Feature.ts b/packages/editor/src/features/feature/Feature.ts index 2f66b7ab0..a381c57ce 100644 --- a/packages/editor/src/features/feature/Feature.ts +++ b/packages/editor/src/features/feature/Feature.ts @@ -24,6 +24,7 @@ import {EditorFeatureProperties, DefaultEditorProperties} from './EditorProperti import {FeatureProperties} from './Properties'; import InternalEditor from '../../IEditor'; import {GeoJSONCoordinate} from '@here/xyz-maps-core'; +import {MapEvent} from '@here/xyz-maps-display'; type EditableProvider = EditableRemoteTileProvider; @@ -87,6 +88,26 @@ class Feature extends GeoJSONFeature { [privateProperty: string]: any }; + /** + * pointerenter event listener for internal use only + * @hidden + * @internal + */ + pointerenter: (e?: MapEvent) => void; + /** + * pointerleave event listener for internal use only + * @hidden + * @internal + */ + pointerleave: (e: MapEvent) => void; + /** + * pointerup event listener for internal use only + * @hidden + * @internal + */ + pointerup: (e: MapEvent) => void; + + constructor(geojsonFeature, provider?: EditableProvider) { super(geojsonFeature, provider); // @ts-ignore diff --git a/packages/editor/src/tools/turnrestriction/TurnRestriction.ts b/packages/editor/src/tools/turnrestriction/TurnRestriction.ts index ce25d0ea9..6ae7aacf4 100644 --- a/packages/editor/src/tools/turnrestriction/TurnRestriction.ts +++ b/packages/editor/src/tools/turnrestriction/TurnRestriction.ts @@ -22,9 +22,11 @@ import {movePointOnPath} from '../../geometry'; import linkTools from '../../features/link/NavlinkTools'; import {isTurnAllowed, isPedestrianOnly, getProperty, setProperty} from './utils'; import Overlay from '../../features/Overlay'; +import {Feature} from '../../features/feature/Feature'; import {Navlink} from '../../features/link/Navlink'; import InternalEditor from '../../IEditor'; + const DISTANCE_METER = 8 * 1e-5; const TURN_RESTRICTION = 'TURN_RESTRICTION_'; @@ -70,7 +72,7 @@ class TurnRestriction { type: TURN_RESTRICTION + 'LINE', sign: TURN_RESTRICTION + curSign }); - const sign = overlay.addImage(rotPnt, null, { + const sign = overlay.addImage(rotPnt, null, { 'type': TURN_RESTRICTION + curSign, 'rotation': -geotools.calcBearing(p1, rotPnt) });