@expofp/floorplan
Version:
Interactive floor plan library for expos and events
20 lines • 1.02 kB
TypeScript
import { type Camera } from '@expofp/schema';
import { type MapSettings } from '../store/types';
/**
* Translates the public {@link Camera} shape into the internal
* {@link MapSettings} one (the `uiState.mapSettings` observable that the map
* reaction applies once the renderer is ready). Only the fields present in
* `camera` appear in the result, so a partial camera stays a partial settings
* patch. `x`/`y` and `lat`/`lng` are pairs — a half-given pair is dropped, as
* the serialized center would be meaningless.
*/
export declare function cameraToMapSettings(camera: Camera): MapSettings;
/**
* The reverse of {@link cameraToMapSettings}: reads the internal
* {@link MapSettings} back into the public {@link Camera} shape. A serialized
* center whose halves don't parse as finite numbers (legacy URLs can carry
* arbitrary strings) is skipped rather than surfaced
* as `NaN`.
*/
export declare function mapSettingsToCamera(settings: MapSettings): Camera;
//# sourceMappingURL=camera-map-settings.d.ts.map