UNPKG

sprotty

Version:

A next-gen framework for graphical views

48 lines 2.52 kB
/******************************************************************************** * Copyright (c) 2017-2018 TypeFox and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is available at * https://www.gnu.org/software/classpath/license.html. * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 ********************************************************************************/ import { VNode } from 'snabbdom'; import { Point } from 'sprotty-protocol/lib/utils/geometry'; import { EdgeLayoutable, EdgePlacement } from 'sprotty-protocol/lib/model'; import { SModelElementImpl } from '../../base/model/smodel'; import { IVNodePostprocessor } from '../../base/views/vnode-postprocessor'; import { Orientation } from '../../utils/geometry'; import { InternalBoundsAware } from '../bounds/model'; import { EdgeRouterRegistry } from '../routing/routing'; import { ILogger } from '../../utils/logging'; export declare class EdgeLayoutPostprocessor implements IVNodePostprocessor { edgeRouterRegistry: EdgeRouterRegistry; protected readonly logger: ILogger; /** * Decorates the vnode with the appropriate transformation based on the element's placement and bounds. * @param vnode - The vnode to decorate. * @param element - The SModelElementImpl to decorate. * @returns The decorated vnode. */ decorate(vnode: VNode, element: SModelElementImpl): VNode; protected getRotatedAlignment(element: EdgeLayoutable & SModelElementImpl & InternalBoundsAware, placement: EdgePlacement, flip: boolean): { x: number; y: number; }; protected getEdgePlacement(element: SModelElementImpl): EdgePlacement; protected getAlignment(label: EdgeLayoutable & SModelElementImpl & InternalBoundsAware, placement: EdgePlacement, angle: number): Point; protected getQuadrant(angle: number): { orientation: Orientation; position: number; }; protected linearFlip(p0: Point, p1: Point, p2: Point, p3: Point, position: number): Point; postUpdate(): void; } //# sourceMappingURL=edge-layout.d.ts.map