From a28b4c4f4a84242f7ffc909973ef29ad5a9e18cf Mon Sep 17 00:00:00 2001 From: mistic100 Date: Sat, 21 Dec 2024 15:31:00 +0100 Subject: [PATCH] Remove deprecated options --- packages/core/src/Viewer.ts | 6 --- .../src/adapters/EquirectangularAdapter.ts | 28 +------------- packages/core/src/components/Overlay.ts | 10 ----- packages/core/src/data/config.ts | 14 ------- packages/core/src/model.ts | 10 +---- packages/core/src/services/DataHelper.ts | 16 +------- packages/core/src/services/Renderer.ts | 28 ++------------ .../src/EquirectangularTilesAdapter.ts | 1 - packages/markers-plugin/src/markers/Marker.ts | 11 ------ .../markers-plugin/src/markers/Marker3D.ts | 23 ++--------- packages/markers-plugin/src/model.ts | 4 -- .../overlays-plugin/src/OverlaysPlugin.ts | 18 --------- packages/overlays-plugin/src/model.ts | 12 ------ .../virtual-tour-plugin/src/ArrowsRenderer.ts | 3 +- .../src/VirtualTourPlugin.ts | 33 ++-------------- .../src/datasources/AbstractDataSource.ts | 14 ------- packages/virtual-tour-plugin/src/model.ts | 38 ++----------------- packages/virtual-tour-plugin/src/utils.ts | 15 -------- 18 files changed, 17 insertions(+), 267 deletions(-) diff --git a/packages/core/src/Viewer.ts b/packages/core/src/Viewer.ts index 1f1faca4a..90e68efa3 100644 --- a/packages/core/src/Viewer.ts +++ b/packages/core/src/Viewer.ts @@ -69,12 +69,6 @@ import { * Photo Sphere Viewer controller */ export class Viewer extends TypedEventTarget { - /** - * Change the order in which the panoData and sphereCorrection angles are applied from 'ZXY' to 'YXZ' - * @deprecated Will be removed in version 5.12 - */ - static useNewAnglesOrder = true; - readonly state: ViewerState; readonly config: ParsedViewerConfig; diff --git a/packages/core/src/adapters/EquirectangularAdapter.ts b/packages/core/src/adapters/EquirectangularAdapter.ts index 16e78b47c..41a0188ec 100644 --- a/packages/core/src/adapters/EquirectangularAdapter.ts +++ b/packages/core/src/adapters/EquirectangularAdapter.ts @@ -4,21 +4,13 @@ import type { Viewer } from '../Viewer'; import { SPHERE_RADIUS } from '../data/constants'; import { SYSTEM } from '../data/system'; import { EquirectangularPanorama, PanoData, PanoDataProvider, PanoramaPosition, Position, TextureData } from '../model'; -import { createTexture, getConfigParser, getXMPValue, isNil, logWarn, mergePanoData } from '../utils'; +import { createTexture, getConfigParser, getXMPValue, isNil, mergePanoData } from '../utils'; import { AbstractAdapter } from './AbstractAdapter'; /** * Configuration for {@link EquirectangularAdapter} */ export type EquirectangularAdapterConfig = { - /** - * @deprecated Use CSS to change the background color of '.psv-canvas' - */ - backgroundColor?: string; - /** - * @deprecated Not supported anymore - */ - interpolateBackground?: boolean; /** * number of faces of the sphere geometry, higher values may decrease performances * @default 64 @@ -41,8 +33,6 @@ export type EquirectangularTextureData = TextureData( { - backgroundColor: null, - interpolateBackground: false, resolution: 64, useXmpData: true, blur: false, @@ -54,18 +44,6 @@ const getConfig = getConfigParser( } return resolution; }, - backgroundColor: (backgroundColor) => { - if (backgroundColor) { - logWarn(`EquirectangularAdapter.backgroundColor is deprecated, use 'canvasBackground' main option instead.`); - } - return backgroundColor; - }, - interpolateBackground: (interpolateBackground) => { - if (interpolateBackground) { - logWarn(`EquirectangularAdapter.interpolateBackground is not supported anymore.`); - } - return false; - }, }, ); @@ -91,10 +69,6 @@ export class EquirectangularAdapter extends AbstractAdapter = { if (!(adapter[0] as any).id) { throw new PSVError(`Adapter has no id.`); } - if ((adapter[0] as any).id === 'little-planet') { - logWarn('LittlePlanetAdapter support has been removed, use `{ fisheye: 2, maxFov: 130 }` to achieve similar effect.'); - adapter = defValue; - } return adapter; }, defaultYaw: (defaultYaw) => { @@ -172,16 +168,6 @@ export const CONFIG_PARSERS: ConfigParsers = { ...lang, }; }, - keyboard: (keyboard) => { - if (!keyboard) { - return false; - } - if (typeof keyboard === 'object') { - logWarn(`Use keyboardActions to configure the keyboard actions, keyboard option must be either true, false, 'fullscreen' or 'always'`); - return 'fullscreen'; - } - return keyboard === 'always' ? 'always' : 'fullscreen'; - }, keyboardActions: (keyboardActions, { rawConfig }) => { if (rawConfig.keyboard && typeof rawConfig.keyboard === 'object') { return rawConfig.keyboard; diff --git a/packages/core/src/model.ts b/packages/core/src/model.ts index 85399e275..835bc690a 100644 --- a/packages/core/src/model.ts +++ b/packages/core/src/model.ts @@ -151,11 +151,7 @@ export type PanoramaOptions = { * enable transition (rotation + fading) between old and new panorama * @default true */ - transition?: boolean | 'fade-only' | TransitionOptions; - /** - * @deprecated Use `transition.speed` - */ - speed?: string | number; + transition?: boolean | TransitionOptions; /** * show the loader while loading the new panorama * @default true @@ -384,7 +380,7 @@ export type ViewerConfig = { /** @default 'zoom move download description caption fullscreen' */ navbar?: boolean | string | Array; lang?: Record; - keyboard?: boolean | 'always' | 'fullscreen' | Record void)>; + keyboard?: boolean | 'always' | 'fullscreen'; keyboardActions?: Record void)>; }; @@ -401,7 +397,6 @@ export type ParsedViewerConfig = Omit< | 'fisheye' | 'requestHeaders' | 'navbar' - | 'keyboard' > & { adapter?: [AdapterConstructor, any]; plugins?: Array<[PluginConstructor, any]>; @@ -411,7 +406,6 @@ export type ParsedViewerConfig = Omit< fisheye?: number; requestHeaders?: (url: string) => Record; navbar?: Array; - keyboard?: false | 'always' | 'fullscreen'; }; /** diff --git a/packages/core/src/services/DataHelper.ts b/packages/core/src/services/DataHelper.ts index 0ee287c40..7c467562e 100644 --- a/packages/core/src/services/DataHelper.ts +++ b/packages/core/src/services/DataHelper.ts @@ -1,6 +1,7 @@ import { Euler, MathUtils, Vector3 } from 'three'; import { PSVError } from '../PSVError'; import type { Viewer } from '../Viewer'; +import { DEFAULTS } from '../data/config'; import { ANIMATION_MIN_DURATION, SPHERE_RADIUS, VIEWER_DATA } from '../data/constants'; import { ExtendedPosition, @@ -19,12 +20,10 @@ import { getShortestArc, isExtendedPosition, isNil, - logWarn, parseAngle, speedToDuration, } from '../utils'; import { AbstractService } from './AbstractService'; -import { DEFAULTS } from '../data/config'; const vector3 = new Vector3(); const EULER_ZERO = new Euler(0, 0, 0, 'ZXY'); @@ -137,12 +136,6 @@ export class DataHelper extends AbstractService { transition = { ...defaultTransition, }; - } else if (options.transition === 'fade-only') { - logWarn(`PanoramaOptions transition "fade-only" value is deprecated, set transition.rotation=false instead.`); - transition = { - ...defaultTransition, - rotation: false, - }; } else if (typeof options.transition === 'object') { transition = { ...defaultTransition, @@ -152,13 +145,6 @@ export class DataHelper extends AbstractService { transition = this.config.defaultTransition; } - if ('speed' in options) { - logWarn(`PanoramaOptions speed is deprecated, set transition.speed instead.`); - if (transition) { - transition.speed = options.speed; - } - } - return transition; } diff --git a/packages/core/src/services/Renderer.ts b/packages/core/src/services/Renderer.ts index 1ae6f92bd..e10a1a8df 100644 --- a/packages/core/src/services/Renderer.ts +++ b/packages/core/src/services/Renderer.ts @@ -42,7 +42,7 @@ import { TextureData, TransitionOptions, } from '../model'; -import { Animation, isNil, logWarn } from '../utils'; +import { Animation, isNil } from '../utils'; import { Viewer } from '../Viewer'; import { AbstractService } from './AbstractService'; @@ -296,18 +296,7 @@ export class Renderer extends AbstractService { */ setPanoramaPose(panoData: PanoData, mesh: Object3D = this.mesh) { const cleanCorrection = this.viewer.dataHelper.cleanPanoramaPose(panoData); - - const i = (cleanCorrection.pan ? 1 : 0) + (cleanCorrection.tilt ? 1 : 0) + (cleanCorrection.roll ? 1 : 0); - if (!Viewer.useNewAnglesOrder && i > 1) { - logWarn(`'panoData' Euler angles have changed in version 5.11.0.`); - logWarn(`Remove your 'useNewAnglesOrder' override to remove this warning (you might have to adapt your poseHeading/posePitch/poseRoll parameters).`); - } - - if (Viewer.useNewAnglesOrder) { - mesh.rotation.set(cleanCorrection.tilt, cleanCorrection.pan, cleanCorrection.roll, 'YXZ'); - } else { - mesh.rotation.set(-cleanCorrection.tilt, -cleanCorrection.pan, -cleanCorrection.roll, 'ZXY'); - } + mesh.rotation.set(cleanCorrection.tilt, cleanCorrection.pan, cleanCorrection.roll, 'YXZ'); } /** @@ -316,18 +305,7 @@ export class Renderer extends AbstractService { */ setSphereCorrection(sphereCorrection: SphereCorrection, group: Object3D = this.meshContainer) { const cleanCorrection = this.viewer.dataHelper.cleanSphereCorrection(sphereCorrection); - - const i = (cleanCorrection.pan ? 1 : 0) + (cleanCorrection.tilt ? 1 : 0) + (cleanCorrection.roll ? 1 : 0); - if (!Viewer.useNewAnglesOrder && i > 1) { - logWarn(`'sphereCorrection' Euler angles have changed in version 5.11.0.`); - logWarn(`Remove your 'useNewAnglesOrder' override to remove this warning (you might have to adapt your poseHeading/posePitch/poseRoll parameters).`); - } - - if (Viewer.useNewAnglesOrder) { - group.rotation.set(cleanCorrection.tilt, cleanCorrection.pan, cleanCorrection.roll, 'YXZ'); - } else { - group.rotation.set(cleanCorrection.tilt, cleanCorrection.pan, cleanCorrection.roll, 'ZXY'); - } + group.rotation.set(cleanCorrection.tilt, cleanCorrection.pan, cleanCorrection.roll, 'YXZ'); } /** diff --git a/packages/equirectangular-tiles-adapter/src/EquirectangularTilesAdapter.ts b/packages/equirectangular-tiles-adapter/src/EquirectangularTilesAdapter.ts index 658abbde3..50b4068ff 100644 --- a/packages/equirectangular-tiles-adapter/src/EquirectangularTilesAdapter.ts +++ b/packages/equirectangular-tiles-adapter/src/EquirectangularTilesAdapter.ts @@ -75,7 +75,6 @@ function meshes(group: Group) { } const getConfig = utils.getConfigParser({ - backgroundColor: null, resolution: 64, showErrorTile: true, baseBlur: true, diff --git a/packages/markers-plugin/src/markers/Marker.ts b/packages/markers-plugin/src/markers/Marker.ts index 3252c2045..1a7d84706 100644 --- a/packages/markers-plugin/src/markers/Marker.ts +++ b/packages/markers-plugin/src/markers/Marker.ts @@ -140,17 +140,6 @@ export abstract class Marker { throw new PSVError(`cannot change marker ${config.id} type`); } - if (utils.isExtendedPosition(config)) { - utils.logWarn('Use the "position" property to configure the position of a marker'); - config.position = this.viewer.dataHelper.cleanPosition(config); - } - - if ('width' in config && 'height' in config) { - utils.logWarn('Use the "size" property to configure the size of a marker'); - // @ts-ignore - config.size = { width: config['width'], height: config['height'] }; - } - this.config = utils.deepmerge(this.config, config as any); if (typeof this.config.tooltip === 'string') { this.config.tooltip = { content: this.config.tooltip }; diff --git a/packages/markers-plugin/src/markers/Marker3D.ts b/packages/markers-plugin/src/markers/Marker3D.ts index 2dab442cc..4937e3c3f 100644 --- a/packages/markers-plugin/src/markers/Marker3D.ts +++ b/packages/markers-plugin/src/markers/Marker3D.ts @@ -116,26 +116,9 @@ export class Marker3D extends Marker { this.viewer.dataHelper.sphericalCoordsToVector3(this.state.position, group.position); group.lookAt(0, group.position.y, 0); - if (this.config.orientation) { - utils.logWarn(`Marker#orientation is deprecated, use "rotation.yaw" or "rotation.pitch" instead`); - mesh.rotateZ(-this.config.rotation.roll); - switch (this.config.orientation) { - case 'horizontal': - group.rotateX(this.state.position.pitch < 0 ? -Math.PI / 2 : Math.PI / 2); - break; - case 'vertical-left': - group.rotateY(-Math.PI * 0.4); - break; - case 'vertical-right': - group.rotateY(Math.PI * 0.4); - break; - // no default - } - } else { - mesh.rotateY(-this.config.rotation.yaw); - mesh.rotateX(-this.config.rotation.pitch); - mesh.rotateZ(-this.config.rotation.roll); - } + mesh.rotateY(-this.config.rotation.yaw); + mesh.rotateX(-this.config.rotation.pitch); + mesh.rotateZ(-this.config.rotation.roll); const p = mesh.geometry.getAttribute('position'); this.state.positions3D = [0, 1, 3, 2].map((i) => { diff --git a/packages/markers-plugin/src/model.ts b/packages/markers-plugin/src/model.ts index 59bd31aeb..40e20624b 100644 --- a/packages/markers-plugin/src/model.ts +++ b/packages/markers-plugin/src/model.ts @@ -112,10 +112,6 @@ export type MarkerConfig = { * Only 3D markers (`imageLayer`, `videoLayer`, `elementLayer`) support `yaw` and `pitch` */ rotation?: string | number | { yaw?: number | string; pitch?: number | string; roll?: number | string }; - /** - * @deprecated Use `rotation` as an object - */ - orientation?: 'front' | 'horizontal' | 'vertical-left' | 'vertical-right'; /** * Configures the scale of the marker depending on the zoom level and/or the horizontal offset (ignored for `polygon`, `polyline`, `imageLayer`, `videoLayer`) */ diff --git a/packages/overlays-plugin/src/OverlaysPlugin.ts b/packages/overlays-plugin/src/OverlaysPlugin.ts index 26ffd7f84..2dcf55aef 100644 --- a/packages/overlays-plugin/src/OverlaysPlugin.ts +++ b/packages/overlays-plugin/src/OverlaysPlugin.ts @@ -115,11 +115,6 @@ export class OverlaysPlugin extends AbstractConfigurablePlugin< throw new PSVError(`Missing overlay "path"`); } - if (config.type === 'video') { - utils.logWarn('"video" overlay are not supported anymore'); - return; - } - const parsedConfig: OverlayConfig = { id: Math.random().toString(36).substring(2), opacity: 1, @@ -138,14 +133,6 @@ export class OverlaysPlugin extends AbstractConfigurablePlugin< } } - /** - * @deprecated - */ - getVideo(_: string): any { - utils.logWarn('"video" overlay are not supported anymore'); - return null; - } - /** * Removes an overlay */ @@ -177,11 +164,6 @@ export class OverlaysPlugin extends AbstractConfigurablePlugin< * Add a spherical overlay */ private async __addSphereImageOverlay(config: SphereOverlayConfig) { - if (config.width || config.height || config.pitch || config.yaw) { - utils.logWarn(`Positionned overlays are not supported anymore`); - return; - } - const currentPanoData = this.viewer.state.textureData.panoData as PanoData; const adapter = this.__getEquirectangularAdapter(); diff --git a/packages/overlays-plugin/src/model.ts b/packages/overlays-plugin/src/model.ts index b1ce36d4a..a2ed5420c 100644 --- a/packages/overlays-plugin/src/model.ts +++ b/packages/overlays-plugin/src/model.ts @@ -3,8 +3,6 @@ import type { CubemapPanorama } from '@photo-sphere-viewer/cubemap-adapter'; export type BaseOverlayConfig = { id?: string; - /* @deprecated */ - type?: 'image' | 'video'; /** * @default 1 */ @@ -20,16 +18,6 @@ export type BaseOverlayConfig = { */ export type SphereOverlayConfig = BaseOverlayConfig & { path: string; - /* @deprecated */ - yaw?: any; - /* @deprecated */ - pitch?: any; - /* @deprecated */ - width?: any; - /* @deprecated */ - height?: any; - /* @deprecated */ - chromaKey?: any; }; /** diff --git a/packages/virtual-tour-plugin/src/ArrowsRenderer.ts b/packages/virtual-tour-plugin/src/ArrowsRenderer.ts index c6dbd9246..42ebcbb95 100644 --- a/packages/virtual-tour-plugin/src/ArrowsRenderer.ts +++ b/packages/virtual-tour-plugin/src/ArrowsRenderer.ts @@ -5,7 +5,6 @@ import { CSS2DObject, CSS2DRenderer } from 'three/examples/jsm/renderers/CSS2DRe import { CSS3DObject, CSS3DRenderer } from 'three/examples/jsm/renderers/CSS3DRenderer.js'; import { LINK_DATA } from './constants'; import { VirtualTourArrowStyle, VirtualTourLink } from './model'; -import { checkArrowStyle } from './utils'; import { type VirtualTourPlugin } from './VirtualTourPlugin'; const ARROW_DATA = 'arrow'; @@ -213,7 +212,7 @@ export class ArrowsRenderer extends AbstractComponent { const conf = { ...this.arrowStyle, - ...checkArrowStyle(link.arrowStyle), + ...link.arrowStyle, }; element.classList.add('psv-virtual-tour-link'); diff --git a/packages/virtual-tour-plugin/src/VirtualTourPlugin.ts b/packages/virtual-tour-plugin/src/VirtualTourPlugin.ts index fd9b69d54..2053a565d 100644 --- a/packages/virtual-tour-plugin/src/VirtualTourPlugin.ts +++ b/packages/virtual-tour-plugin/src/VirtualTourPlugin.ts @@ -19,7 +19,7 @@ import { VirtualTourPluginConfig, VirtualTourTransitionOptions, } from './model'; -import { checkArrowStyle, gpsToSpherical } from './utils'; +import { gpsToSpherical } from './utils'; const getConfig = utils.getConfigParser( { @@ -39,10 +39,7 @@ const getConfig = utils.getConfigParser( linksOnCompass: true, showLinkTooltip: true, getLinkTooltip: null, - markerStyle: null, arrowStyle: DEFAULT_ARROW, - markerPitchOffset: null, - arrowPosition: null, arrowsPosition: { minPitch: 0.3, maxPitch: Math.PI / 2, @@ -65,36 +62,16 @@ const getConfig = utils.getConfigParser( return positionMode; }, renderMode(renderMode) { - if (renderMode === 'markers') { - utils.logWarn(`VirtualTourPlugin: "renderMode" markers has been replaced by 2d`); - return '2d'; - } if (renderMode !== '3d' && renderMode !== '2d') { throw new PSVError('VirtualTourPlugin: invalid renderMode'); } return renderMode; }, - markerStyle(markerStyle) { - if (markerStyle) { - utils.logWarn(`VirtualTourPlugin: "markerStyle" is deprecated`); - } - return null; - }, - arrowPosition(arrowPosition) { - if (arrowPosition) { - utils.logWarn(`VirtualTourPlugin: "arrowPosition" is deprecated`); - } - return null; - }, - arrowsPosition(arrowsPosition, { defValue, rawConfig }) { - if (!utils.isNil(rawConfig.markerPitchOffset)) { - utils.logWarn(`VirtualTourPlugin: "markerPitchOffset" is deprecated, use "arrowsPosition.linkPitchOffset" instead`); - arrowsPosition.linkPitchOffset = rawConfig.markerPitchOffset; - } + arrowsPosition(arrowsPosition, { defValue }) { return { ...defValue, ...arrowsPosition }; }, arrowStyle(arrowStyle, { defValue }) { - return { ...defValue, ...checkArrowStyle(arrowStyle) }; + return { ...defValue, arrowStyle }; }, map(map, { rawConfig }) { if (map) { @@ -338,10 +315,6 @@ export class VirtualTourPlugin extends AbstractConfigurablePlugin< ...options, }; - if ('fadeIn' in transitionOptions) { - utils.logWarn('VirtualTourTransitionOptions.fadeIn is deprecated, use "effect" instead.'); - transitionOptions.effect = transitionOptions.fadeIn ? 'fade' : 'none'; - } if (!transitionOptions.effect) { transitionOptions.effect = 'none'; } diff --git a/packages/virtual-tour-plugin/src/datasources/AbstractDataSource.ts b/packages/virtual-tour-plugin/src/datasources/AbstractDataSource.ts index bbe36ce87..b09e47314 100644 --- a/packages/virtual-tour-plugin/src/datasources/AbstractDataSource.ts +++ b/packages/virtual-tour-plugin/src/datasources/AbstractDataSource.ts @@ -29,11 +29,6 @@ export abstract class AbstractDatasource { if (!node.panorama) { throw new PSVError(`No panorama provided for node ${node.id}`); } - if ('position' in node) { - utils.logWarn('Use the "gps" property to configure the GPS position of a virtual node'); - // @ts-ignore - node.gps = node['position']; - } if (this.plugin.isGps && !(node.gps?.length >= 2)) { throw new PSVError(`No GPS position provided for node ${node.id}`); } @@ -56,15 +51,6 @@ export abstract class AbstractDatasource { if (link.nodeId === node.id) { throw new PSVError(`Node ${node.id} links to itself`); } - if (Array.isArray(link.position)) { - utils.logWarn('Use the "gps" property to configure the GPS position of a virtual link'); - link.gps = link.position as any; - delete link.position; - } - if (utils.isExtendedPosition(link)) { - utils.logWarn('Use the "position" property to configure the position of a virtual link'); - link.position = this.viewer.dataHelper.cleanPosition(link); - } if (!this.plugin.isGps && !utils.isExtendedPosition(link.position)) { throw new PSVError(`No position provided for link ${link.nodeId} of node ${node.id}`); } diff --git a/packages/virtual-tour-plugin/src/model.ts b/packages/virtual-tour-plugin/src/model.ts index e0d5edd0f..0396954f8 100644 --- a/packages/virtual-tour-plugin/src/model.ts +++ b/packages/virtual-tour-plugin/src/model.ts @@ -41,20 +41,8 @@ export type VirtualTourArrowStyle = { * CSS properties to set on the arrow */ style?: Record; - - /** @deprecated */ - color?: string; - /** @deprecated */ - hoverColor?: string; - /** @deprecated */ - outlineColor?: string; }; -/** - * @deprecated - */ -export type VirtualTourMarkerStyle = any; - /** * Behaviour of the transition between nodes */ @@ -74,10 +62,6 @@ export type VirtualTourTransitionOptions = { * @default '20rpm' */ speed?: string | number; - /** - * @deprecated Use `effect` instead - */ - fadeIn?: boolean; /** * Enable rotation in the direction of the next node * @default true @@ -116,10 +100,6 @@ export type VirtualTourLink = Partial & { * define the GPS position of the node (GPS mode) */ gps?: [number, number, number?]; - /** - * @deprecated - */ - markerStyle?: VirtualTourMarkerStyle; /** * override global arrow style */ @@ -201,7 +181,7 @@ export type VirtualTourPluginConfig = { * configure rendering mode of links * @default '3d' */ - renderMode?: '3d' | '2d' | 'markers'; + renderMode?: '3d' | '2d'; /** * initial nodes (client mode) */ @@ -220,10 +200,10 @@ export type VirtualTourPluginConfig = { preload?: boolean | ((node: VirtualTourNode, link: VirtualTourLink) => boolean); /** * Configuration of the transition between nodes. Can be a callback. - * @default `{ showLoader: true, speed: '20rpm', fadeIn: true, rotation: true }` + * @default `{ showLoader: true, speed: '20rpm', effect: 'fade', rotation: true }` */ transitionOptions?: - | Pick + | Pick | (( toNode: VirtualTourNode, fromNode?: VirtualTourNode, @@ -243,22 +223,10 @@ export type VirtualTourPluginConfig = { * callback to modify the content of the tooltip */ getLinkTooltip?: (content: string, link: VirtualTourLink, node: VirtualTourNode) => string; - /** - * @deprecated - */ - markerStyle?: VirtualTourMarkerStyle; /** * global arrow style */ arrowStyle?: VirtualTourArrowStyle; - /** - * @deprecated - */ - markerPitchOffset?: number; - /** - * @deprecated - */ - arrowPosition?: 'top' | 'bottom'; /** * configuration of the arrows container */ diff --git a/packages/virtual-tour-plugin/src/utils.ts b/packages/virtual-tour-plugin/src/utils.ts index d7d39777e..6bfae31df 100644 --- a/packages/virtual-tour-plugin/src/utils.ts +++ b/packages/virtual-tour-plugin/src/utils.ts @@ -44,18 +44,3 @@ function bearing(p1: [number, number], p2: [number, number]): number { const x = Math.cos(lat1) * Math.sin(lat2) - Math.sin(lat1) * Math.cos(lat2) * Math.cos(long2 - long1); return Math.atan2(y, x); } - -/** - * @deprecated - */ -export function checkArrowStyle(style: any): any { - if (style && ['color', 'hoverColor', 'outlineColor'].some(key => key in style)) { - utils.logWarn(`VirtualTourPlugin: "arrowStyle" does not support color, hoverColor, outlineColor anymore`); - return undefined; - } - if (style && typeof style.size === 'number') { - utils.logWarn(`VirtualTourPlugin: "arrowStyle.size" must be an object (width + height, in pixels)`); - delete style.size; - } - return style; -}