Skip to main content



  • A convenience method to find an EnabledElement given a reference to its associated element. Commonly used in code that’s handling a custom event emitted by this library.


    Using the renderingEngine to find the enabled element:

    const element = getRenderingEngine(renderingEngineId)

    const enabledElement = getEnabledElement(element)

    Using a cornerstone event’s “element”

    // Our "cornerstone events" contain the source element, which is
    // raised on the viewport's div element
    const { element } = evt.detail
    const enabledElement = getEnabledElement(element)


    • element: HTMLDivElement

      a reference to an EnabledElement/Viewport’s div element

    Returns IEnabledElement | undefined

    the associated EnabledElement, or undefined if no matching EnabledElement can be found