ink-cartridge
    Preparing search index...

    Function openLayer

    • Open a new layer with a unique ID and z-index.

      These lifecycle functions are module-level: they dispatch to the most recently mounted provider, so they can be called from effects, key handlers, or plain module code as long as a ScenarioManagementProvider is mounted (or from the equivalent methods of useScreenSystem()). Opening alone renders nothing — follow it with applyElement. Higher z-index layers appear on top.

      Parameters

      • layerId: string
      • zIndex: number
      • Optionaloptions: LayerOptions

      Returns void

      The full floating-layer lifecycle from a component effect: open the layer, apply its element, and close it again on unmount.

      useEffect(() => {
      openLayer('edit-panel', 10);
      applyElement('edit-panel', {
      elementId: 'edit-panel-element',
      element: EditPanel,
      props: { value, onClose: () => closeLayer('edit-panel') },
      });
      return () => closeLayer('edit-panel');
      }, [value]);