How to use the @bentley/ui-ninezone.StagePanelsManager.getPanel function in @bentley/ui-ninezone

To help you get started, we’ve selected a few @bentley/ui-ninezone examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imodeljs / imodeljs / ui / framework / src / ui-framework / frontstage / Frontstage.tsx View on Github external
private cloneStagePanelElement(panelDef: StagePanelDef | undefined, runtimeProps: FrontstageRuntimeProps): React.ReactNode {
    if (!this.state.isUiVisible && UiShowHideManager.showHidePanels)
      return null;

    if (panelDef) {
      const { location } = panelDef;
      const panelElement = Frontstage.getStagePanelElement(location, this.props);

      // istanbul ignore else
      if (panelElement && React.isValidElement(panelElement)) {
        const panelKey = getNestedStagePanelKey(panelDef.location);
        const panels = runtimeProps.nineZone.nested.panels[panelKey.id];
        const panel = StagePanelsManager.getPanel(panelKey.type, panels);
        const draggedWidget = runtimeProps.nineZone.zones.draggedWidget;

        const panelRuntimeProps: StagePanelRuntimeProps = {
          draggedWidgetId: draggedWidget ? draggedWidget.id : undefined,
          getWidgetContentRef: this._getContentRef,
          isInFooterMode: runtimeProps.nineZone.zones.isInFooterMode,
          isTargeted: !!runtimeProps.nineZone.zones.target,
          panel,
          panelDef,
          stagePanelChangeHandler: runtimeProps.stagePanelChangeHandler,
          widgetChangeHandler: runtimeProps.widgetChangeHandler,
          widgets: runtimeProps.nineZone.zones.widgets,
          widgetTabs: runtimeProps.widgetTabs,
          zoneDefProvider: runtimeProps.zoneDefProvider,
        };
github imodeljs / imodeljs / ui / framework / src / ui-framework / frontstage / FrontstageComposer.tsx View on Github external
}, () => {
        const frontstage = FrontstageManager.activeFrontstageDef;
        const stagePanel = frontstage && frontstage.getStagePanelDef(panelLocation);
        if (stagePanel) {
          const panels = this.state.nineZone.nested.panels[nestedPanelKey.id];
          const panel = StagePanelsManager.getPanel(nestedPanelKey.type, panels);
          const panelState = isCollapsedToPanelState(panel.isCollapsed);
          stagePanel.panelState = panelState;
        }
      });
  }