UNPKG

@kieler/klighd-core

Version:

Core KLighD diagram visualization with Sprotty

57 lines 2.74 kB
import { SKGraphElement } from '@kieler/klighd-interactive/lib/constraint-classes'; import { KlighdInteractiveMouseListener } from '@kieler/klighd-interactive/lib/klighd-interactive-mouselistener'; import { VNode } from 'snabbdom'; import { IVNodePostprocessor, ModelRenderer, RenderingTargetKind, SModelElementImpl, SParentElementImpl, ViewRegistry } from 'sprotty'; import { Viewport } from 'sprotty-protocol'; import { DepthMap } from './depth-map'; import { RenderOptionsRegistry } from './options/render-options-registry'; import { KRenderingLibrary } from './skgraph-models'; import { TitleStorage } from './titles/title-storage'; /** * Contains additional data and functionality needed for the rendering of SKGraphs. */ export declare class SKGraphModelRenderer extends ModelRenderer { readonly viewRegistry: ViewRegistry; readonly targetKind: RenderingTargetKind; constructor(viewRegistry: ViewRegistry, targetKind: RenderingTargetKind, postprocessors: IVNodePostprocessor[]); /** * Map for all bounds related to KRenderingRefs, mapped by their rendering ID. */ boundsMap: Record<string, unknown>; /** * Map for all decoration data (bounds and rotation of decorators) related to KRenderingRefs, mapped by their rendering ID. */ decorationMap: Record<string, unknown>; depthMap?: DepthMap; /** * Access to the rendering library, expected to be defined on the root graph element. */ kRenderingLibrary?: KRenderingLibrary; mListener: KlighdInteractiveMouseListener; renderingDefs: Map<string, VNode>; renderOptionsRegistry: RenderOptionsRegistry; /** * Storage for the title renderings */ titleStorage: TitleStorage; viewport: Viewport; /** Used to force rendering independant of the depthMap. Needed by the proxy-view. */ forceRendering: boolean; /** * Renders all children of the SKGraph that should be rendered within the child area of the element. * * @param element The element to render the children from. */ renderChildAreaChildren(element: Readonly<SParentElementImpl> & SKGraphElement): VNode[]; /** * Renders all children of the SKGraph that should be rendered outside of the child area of the element. * * @param element The element to render the children from. */ renderNonChildAreaChildren(element: Readonly<SParentElementImpl> & SKGraphElement): VNode[]; /** Renders an element forcefully, i.e. independant of the depthMap. */ forceRenderElement(element: SKGraphElement): VNode | undefined; /** @inheritdoc */ renderElement(element: Readonly<SModelElementImpl>): VNode | undefined; } //# sourceMappingURL=skgraph-model-renderer.d.ts.map