Skip to content

gi-nx


gi-nx / updateUiLayout

ts
function updateUiLayout(layout: Partial<Pick<{
  activeOverlay: GiraffeOverLays;
  blockManagerBlockId: string;
  blockManagerWidth: number;
  commandBarOpen: boolean;
  contentLibraryPackId: number;
  contentLibraryWidth: number;
  dendroEditorOpen: boolean;
  drawingLayerNameBeingEdited: string;
  drawMenuOpen: string;
  dropZoneDisabled: boolean;
  editLayerSettingsId: string;
  geoCoderOpen: boolean;
  layerGroupNameBeingEdited: string;
  leftBarOpen: boolean;
  leftBarOpenWidth: number;
  leftBarTab: LeftBarContent;
  lensTableHeight: number;
  lensTableMode: TableDisplayMode;
  manageLayerSettingsId: string;
  newProjectSplashOpen: boolean;
  nodesEditorWidth: number;
  projectSettingsTab: "system" | "workspace" | "other" | "attachments";
  rememberProperties: boolean;
  rightBarContent: RightBarContent;
  rightBarOpen: boolean;
  rightBarOpenWidth: number;
  scenarioManagerScenarioId: string;
  scenarioManagerWidth: number;
  sdkPopupOpen: boolean;
  secondLeftBar: "blocks" | "scenarios" | "node" | "usage" | "contentLibrary";
  showBottomBar: boolean;
  usageEditorActiveUsage: string;
  usageEditorWidth: number;
}, 
  | "leftBarOpen"
  | "rightBarOpen"
  | "leftBarOpenWidth"
  | "rightBarOpenWidth"
  | "lensTableHeight"
  | "sdkPopupOpen"
  | "activeOverlay">> & {
  bottomBarIframe?: {
     height: number;
     url: string;
  };
}): void;

Update UI layout settings (sidebar widths, visibility, etc.).

Parameters

ParameterTypeDescription
layoutPartial<Pick<{ activeOverlay: GiraffeOverLays; blockManagerBlockId: string; blockManagerWidth: number; commandBarOpen: boolean; contentLibraryPackId: number; contentLibraryWidth: number; dendroEditorOpen: boolean; drawingLayerNameBeingEdited: string; drawMenuOpen: string; dropZoneDisabled: boolean; editLayerSettingsId: string; geoCoderOpen: boolean; layerGroupNameBeingEdited: string; leftBarOpen: boolean; leftBarOpenWidth: number; leftBarTab: LeftBarContent; lensTableHeight: number; lensTableMode: TableDisplayMode; manageLayerSettingsId: string; newProjectSplashOpen: boolean; nodesEditorWidth: number; projectSettingsTab: "system" | "workspace" | "other" | "attachments"; rememberProperties: boolean; rightBarContent: RightBarContent; rightBarOpen: boolean; rightBarOpenWidth: number; scenarioManagerScenarioId: string; scenarioManagerWidth: number; sdkPopupOpen: boolean; secondLeftBar: "blocks" | "scenarios" | "node" | "usage" | "contentLibrary"; showBottomBar: boolean; usageEditorActiveUsage: string; usageEditorWidth: number; }, | "leftBarOpen" | "rightBarOpen" | "leftBarOpenWidth" | "rightBarOpenWidth" | "lensTableHeight" | "sdkPopupOpen" | "activeOverlay">> & { bottomBarIframe?: { height: number; url: string; }; }Object with optional layout properties: - leftBarOpen: boolean - Show/hide left sidebar - leftBarOpenWidth: number - Width of left sidebar in pixels - rightBarOpen: boolean - Show/hide right sidebar - rightBarOpenWidth: number - Width of right sidebar in pixels - lensTableHeight: number - Height of lens table in pixels - bottomBarIframe:

Returns

void

void

Throws

Error "Invalid overlay: {name}" if activeOverlay is not a valid overlay

Example

typescript
rpc.invoke("updateUiLayout", [{
  leftBarOpen: false,
  rightBarOpenWidth: 400,
  lensTableHeight: 200
}]);