React Advanced Odontogram - v2.6.0
    Preparing search index...

    Function setToothAnatomy

    • Switch the tooth-anatomy profile, and rebuild the chart onto it.

      ASYNC since 2.6.0: the measured artwork is code-split, so selecting it first awaits its chunk — the profile is always loaded before the flag flips, which keeps activeAnatomyProfile() synchronous for every render path. The grid is then rebuilt HERE (a no-op until initOdontogram()), so the pre-2.6.0 setToothAnatomy(v); rebuildGrid(); idiom stays correct without awaiting: the caller's own rebuild may run early on the old profile, and this one puts the grid right once the profile is in place.

      No-op (does not notify) when the profile is already selected or already on its way in. Never rejects: a chunk that fails to load is reported on the console and leaves the current profile selected, so an un-awaited call can never raise an unhandled rejection in a host app. Also invalidates the perio-chart template cache so that chart re-parses the new profile's templates on its next load.

      notifyStateChange() fires only AFTER the rebuild, so a subscriber (the React context mirrors this flag into data-anatomy) can never style a grid that is still drawn on the other profile.

      Parameters

      Returns Promise<void>