UNPKG

videx-3d

Version:

React 3D component library designed for sub surface visualizations in the browser

47 lines (46 loc) 1.65 kB
import { PropsWithChildren } from 'react'; import { AnnotationLayer } from './types'; /** * AnnotationsLayer props * @expand */ export type AnnotationsLayerProps = Partial<AnnotationLayer> & { id: string; name: string; }; /** * Use the AnnotationsLayer component to register and configure a layer for adding * annotations. This needs to be added as a child of the `Annotations` component. * * @example * <Annotations> * <AnnotationsLayer * id="wellbore-labels" * name="Wellbore Labels" * priority={4} * anchorSize={5} * anchorColor='cyan' * connectorWidth={1.5} * distanceFactor={1000} * labelOffset={50} * minDistance={1} * maxDistance={10000} * anchorOcclusionRadius={20} * labelComponent={WellboreAnnotationLabel} * onClick={(annotation: AnnotationComponentProps) => { * dispatchEvent(new CameraFocusAtPointEvent({ point: annotation.position, distance: 500 })) * }} * /> * </Annotations> * * @remarks * The AnnotationsLayer component is for adding and configuring a layer. Annotations are added to a layer * using the `useAnnotations` hook with a layer id and a user defined scope. * * @see [Storybook](/videx-3d/?path=/docs/components-misc-annotations--docs) * @see {@link Annotations} * @see {@link useAnnotations} * * @group Components */ export declare const AnnotationsLayer: ({ id, name, priority, visible, distanceFactor, minDistance, maxDistance, anchorOcclusionRadius, anchorSize, anchorColor, connectorWidth, connectorColor, labelOffset, labelComponent, onClick, children, }: PropsWithChildren<AnnotationsLayerProps>) => import("react/jsx-runtime").JSX.Element;