Skip to content
D
Documentation

InteractionConfigPanelComponent

reference
1 min readUpdated

Import it from @grafloria/angular.

InteractionConfigPanelComponent

Configuration UI panel for interaction mode settings. Allows users to customize interaction behavior at runtime.

ts
@Component({
    selector: 'grafloria-interaction-config-panel',
    imports: [CommonModule, FormsModule],
    templateUrl: './interaction-config-panel.component.html',
    styleUrls: ['./interaction-config-panel.component.css'],
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class InteractionConfigPanelComponent implements OnInit, OnChanges

Use it as <grafloria-interaction-config-panel> in a template.

Inputs

NameTypeDefaultDescription
engine?DiagramEngineDiagram engine instance (required)
expanded?Whether the panel is expanded by default
title?Panel title
showAdvanced?Show advanced settings

Outputs

  • configChanged — Emit config changes

Properties

NameTypeDefaultDescription
engineDiagramEngineDiagram engine instance (required)
expandedfalseWhether the panel is expanded by default
title'Interaction Settings'Panel title
showAdvancedtrueShow advanced settings
configChangedEmit config changes
configInteractionConfigCurrent configuration (local copy)
isCollapsedtruePanel collapsed state
isAdvancedCollapsedtrueAdvanced settings collapsed state
interactionModesInteraction mode options
portVisibilityOptionsPort visibility options
connectionLineStylesConnection line style options

Methods

  • ngOnInit(): void
  • ngOnChanges(changes: SimpleChanges): void
  • loadConfig(): void — Load current configuration from engine
  • toggleCollapse(): void — Toggle panel collapsed state
  • toggleAdvanced(): void — Toggle advanced settings collapsed state
  • onModeChange(mode: string): void — Handle interaction mode change
  • onPortVisibilityChange(visibility: string): void — Handle port visibility change
  • onConnectionLineStyleChange(style: string): void — Handle connection line style change
  • onPortRadiusChange(radius: number): void — Handle port radius change
  • onPortHoverScaleChange(scale: number): void — Handle port hover scale factor change
  • onSnapRadiusChange(radius: number): void — Handle snap radius change
  • onToggleChange(key: keyof InteractionConfig, value: boolean): void — Handle toggle changes
  • resetToDefaults(): void — Reset to default configuration
  • getModeDescription(): string — Get description for current mode
  • getPortVisibilityDescription(): string — Get description for current port visibility
  • getConnectionLineStyleDescription(): string — Get description for current connection line style

Example

html
<grafloria-interaction-config-panel
  [engine]="diagramEngine"
  [expanded]="true"
  (configChanged)="onConfigChange($event)">
</grafloria-interaction-config-panel>

Was this page helpful?

InteractionConfigPanelComponent — Grafloria