How to use the sprotty/lib.toDegrees function in sprotty

To help you get started, we’ve selected a few sprotty 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 theia-ide / yangster / theia-yang-extension / src / frontend / yangdiagram / views.tsx View on Github external
protected renderAdditionals(edge: SEdge, segments: Point[], context: RenderingContext): VNode[] {
        const p1 = segments[segments.length - 2]
        const p2 = segments[segments.length - 1]
        return [
github eclipsesource / graphical-lsp / client / examples / theia-ecore / sprotty-ecore / src / views.tsx View on Github external
export function angle(x0: Point, x1: Point): number {
    return toDegrees(Math.atan2(x1.y - x0.y, x1.x
        - x0.x));
}
github TypeFox / npm-dependency-graph / depgraph-navigator / src / browser / graph / graph-views.tsx View on Github external
protected renderAdditionals(edge: DependencyGraphEdge, segments: Point[], context: RenderingContext): VNode[] {
        const p2 = segments[segments.length - 1];
        let p1: Point;
        let index = segments.length - 2;
        do {
            p1 = segments[index];
            index--;
        } while (index >= 0 && maxDistance(p1, p2) < this.arrowLength);
        return [