ink-cartridge
    Preparing search index...

    Function restoreLayerZIndex

    • Undo bringLayerToFront: put a regular layer's zIndex back to the value it was opened with and re-sort allLayers. The layer object is replaced via spread — elements, regionFocus, hostPage and crossPage references are kept, so element components do not remount and no user state is lost.

      No-op when the layer's zIndex already equals its initial value. Modal layers are unaffected, mirroring bringLayerToFront.

      Parameters

      • targetLayerId: string

      Returns void

      const { restoreLayerZIndex } = useScreenSystem();
      restoreLayerZIndex('edit-panel');