• Preparing search index...
  • The search index is not available
@xeokit/sdk - v0.1.0
  • @xeokit/sdk
  • inspect
  • sceneModel
  • labelForCode

Function labelForCode

  • labelForCode(
        code: string,
        registry?: inspect.sceneModel.InspectionRegistry,
    ): string

    Resolve an issue code to its human-readable label by consulting the labels maps on every Inspection registered in registry (default DEFAULT_INSPECTION_REGISTRY).

    UIs use this when rendering codes: instead of showing GEOMETRY_DUPLICATE, they show "Duplicate geometry" (the friendly form), and a glance at any inspection's labels map tells you which strings will surface.

    Falls back to the code itself when no label is registered — codes added by external plugins that don't ship a label still render legibly.

    Parameters

    • code: string

      The issue code to look up.

    • registry: inspect.sceneModel.InspectionRegistry = DEFAULT_INSPECTION_REGISTRY

      The registry to walk. Defaults to DEFAULT_INSPECTION_REGISTRY.

    Returns string

    The friendly label, or code when no inspection in the registry registers one.

    • Defined in packages/sdk/src/inspect/sceneModel/labels/labelForCode.ts:26

Settings

Member Visibility
@xeokit/sdk - v0.1.0
  • Loading...

Generated using TypeDoc