![]() |
To create such angles, drag the connection with your pointer and click once at the location where you want to create an angle. (For the first angle, indicated in the previous diagram, you can just drag your pointer without clicking to form a bend.) Resume dragging (and optionally clicking to create angles) until you reach the end of the connection. Click close to the destination object or close to the last bend to end the connection.
Hint: If the connection seems to be stuck to the pointer and you cannot end it, double click or press Ctrl a to release the connection.
To lengthen or shorten a connection between two objects, click on one of the objects and move it further away from or closer to the other object. The connection stretches or shrinks depending on which way you drag the object. If there are multiple bends in a connection, only the last two links shorten or stretch as you drag the connected object. To shorten an unattached connection, click on the free end and retrace the connection route towards the object. The connection shrinks as you drag the pointer. Drawing Diagonal Connections
When you drag a diagonal connection, G2 draws it as a solid line (one pixel wide) in the color first mentioned in the cross-section specification for the connection class.
To draw a diagonal connection:
![]() |
Note: Junction blocks work exactly the same way for diagonal connections as for orthogonal connections, except that the junction blocks are not created automatically.
Connecting to Objects Without Stubs
You can lengthen a stub by dragging it with the pointer and then connecting it to another item. While at least one object must have a stub to begin a connection, other items that you connect to may or may not have stubs.
![]() |
After you connect a stub to an item that did not previously have a connection, deleting the connection leaves the stub intact.
Defining Connectedness
Objects are considered connected to one another only when a direct path exists between them, consisting of connections or junction blocks. Other objects cannot exist between two objects in a connection. Two objects are:
A connect B and B connect C does not imply A connect C. Note that two items could be both directly and indirectly connected if more than one route exists between them.
All G2 items that permit connections can restrict other items from connecting to them by using this configuration statement:
declare properties as follows: not manual connections.
for each connection connected to my-object do, will not locate connections of any items that are not on workspaces.
To delete a stub:
To delete a connection:
delete. The connection is deleted without confirmation.
![]() |
Connection Layering
As Layering Items Upon the Same Workspace describes, each item upon a workspace has an associated item-layer-position. Connections are no exception. The item-layer-position of a connection is always above the object to which it is drawn to. G2 displays connections is this manner regardless of whether the connections are drawn interactively or programmatically.
Connections are layered above the object at their input end. For non-directional connections drawn interactively, this is the end from which you drag the stub, or the from object for connections drawn programmatically.