Type Alias AnnotationsState

AnnotationsState: {
    addLayerAnnotations: (
        layerId: string,
        scope: string,
        annotations: AnnotationProps[],
    ) => void;
    annotations: Record<string, AnnotationProps[]>;
    clear: () => void;
    createLayer: (newLayer: AnnotationLayer) => () => void;
    instances: AnnotationInstance[];
    layerExist: (id: string) => boolean;
    layers: Record<string, AnnotationLayer>;
    removeLayerAnnotations: (layerId: string, scope?: string) => void;
    setInstances: (newInstances: AnnotationInstance[]) => void;
    toggleVisibility: () => void;
    update: {
        ref: ReturnType<typeof setTimeout> | null;
        required: boolean;
        setRef: (v: ReturnType<typeof setTimeout>) => void;
    };
    updateLayer: (id: string, updatedLayer: Partial<AnnotationLayer>) => void;
    visible: boolean;
}

Type declaration

  • addLayerAnnotations: (layerId: string, scope: string, annotations: AnnotationProps[]) => void
  • annotations: Record<string, AnnotationProps[]>
  • clear: () => void
  • createLayer: (newLayer: AnnotationLayer) => () => void
  • instances: AnnotationInstance[]
  • layerExist: (id: string) => boolean
  • layers: Record<string, AnnotationLayer>
  • removeLayerAnnotations: (layerId: string, scope?: string) => void
  • setInstances: (newInstances: AnnotationInstance[]) => void
  • toggleVisibility: () => void
  • update: {
        ref: ReturnType<typeof setTimeout> | null;
        required: boolean;
        setRef: (v: ReturnType<typeof setTimeout>) => void;
    }
  • updateLayer: (id: string, updatedLayer: Partial<AnnotationLayer>) => void
  • visible: boolean