This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. Extensions can be found in the GoJS kit under the `extensions` or `extensionsTS` folders. See the Extensions intro page for more information.

### Hierarchy

- GraphObject
  - Panel
    - Part
      - Link
        - BalloonLink

This custom Link class customizes its Shape to surround the comment node (the from node). If the Shape is filled, it will obscure the comment itself unless the Link is behind the comment node. Thus the default layer for BalloonLinks is "Background".

If you want to experiment with this extension, try the Balloon Links sample.

## Index

### Constructors

- constructor

### Properties

- base

### Methods

- cloneProtected
- makeGeometry
- pathToCorner

## Constructors

### constructor

- new BalloonLink(): BalloonLink

- Constructs a BalloonLink and sets the Part.layerName property to "Background".

  #### Returns BalloonLink

## Properties

### base : number

- Gets or sets width of the base of the triangle at the center point of the Link.fromNode.

  The default value is 10.

## Methods

### Protected Override cloneProtected

- cloneProtected(copy: this): void

- Copies properties to a cloned BalloonLink.

  #### Parameters

  - ##### copy: this

  #### Returns void

### Override makeGeometry

- makeGeometry(): Geometry

- Produce a Geometry from the Link's route that draws a "balloon" shape around the Link.fromNode and has a triangular shape with the base at the fromNode and the top at the toNode.

  #### Returns Geometry

### pathToCorner

- pathToCorner(side: number, bb: Rect, fig: PathFigure, pos: Rect, L: Point, R: Point): void

- Draw a line to a corner, but not if the comment arrow encompasses that corner.

  #### Parameters

  - ##### side: number

  - ##### bb: Rect

  - ##### fig: PathFigure

  - ##### pos: Rect

  - ##### L: Point

  - ##### R: Point

  #### Returns void

Copyright © 1998-2020 by Northwoods Software Corporation.