Skip to content

Commit

Permalink
Fix #743 virtual tour: invalid node markers type
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Sep 1, 2022
1 parent cae8c85 commit 410b37a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions types/plugins/virtual-tour/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Event } from 'uevent';
import { AbstractPlugin, Position, Viewer, ViewerOptions } from '../..';
import { Marker, MarkerProperties } from '../markers';
import { MarkerProperties } from '../markers';

/**
* @summary Definition of a single node in the tour
Expand All @@ -15,7 +15,7 @@ export type VirtualTourNode = {
name?: string;
caption?: string;
description?: string;
markers?: Marker[];
markers?: MarkerProperties[];
};

/**
Expand All @@ -25,7 +25,7 @@ export type VirtualTourNodeLink = {
nodeId: string;
name?: string;
position?: [number, number, number?];
markerStyle?: Omit<MarkerProperties, 'id' | 'longitude' | 'latitude' | 'polygonPx' | 'polygonRad' | 'polylinePx' | 'polylineRad' | 'tooltip' | 'content' | 'hideList' | 'visible' | 'data'>;
markerStyle?: VirtualTourMarkerStyle;
arrowStyle?: VirtualTourArrowStyle;
};

Expand All @@ -43,6 +43,11 @@ export type VirtualTourArrowStyle = {
scale?: [number, number];
};

/**
* @summary Style of the marker in markers mode
*/
export type VirtualTourMarkerStyle = Omit<MarkerProperties, 'id' | 'longitude' | 'latitude' | 'polygonPx' | 'polygonRad' | 'polylinePx' | 'polylineRad' | 'tooltip' | 'content' | 'hideList' | 'visible' | 'data'>;

/**
* @summary Data associated to the "node-changed" event
*/
Expand All @@ -66,7 +71,7 @@ export type VirtualTourPluginPluginOptions = {
preload?: boolean | ((node: VirtualTourNode, link: VirtualTourNodeLink) => boolean);
rotateSpeed?: boolean | string | number;
transition?: boolean | number;
markerStyle?: MarkerProperties;
markerStyle?: VirtualTourMarkerStyle;
arrowStyle?: VirtualTourArrowStyle;
markerLatOffset?: number;
arrowPosition?: 'top' | 'bottom';
Expand Down

0 comments on commit 410b37a

Please sign in to comment.