Making the connection
This page gives the dynamic model for connecting and disconnecting
nets. There are two main elements involved: terminals, which are
ultimately what nets are to be connected between, and grapples, which
are attached to the ends of a net when it is selected, and which can
then be grabbed to connected or reconnect the net.
The first diagram is the dynamic model for the basic actions of
connecting nets to terminals. Terminals appear to the user to be
"active" -- that is, when the mouse moves over a terminal, it
highlights to indicate that clicking on it will start a new net. This
is shown in the Terminal part of the diagram. Note the term "hbox":
this is the bounding box of the terminal plus some hysteresis.
Once a net is created, control moves into the Net part of the
diagram. Moving the mouse makes the end of the net follow it. Again,
if over a suitable terminal, or "target," the terminal highlights and
the end of the nets snaps to the right connection point to provide
positive feedback to the user.
If the mouse is released when the mouse is not over a suitable
target, then the net is not deleted, but is given a permanent grapple
on the disconnected end, which can be used to reenter the Dragging
state. A net can be disconnected by selecting it, and then clicking
and dragging a grapple attached to a connected end.
Additional notes on the model:
- The Terminal part of the diagram is fairly straight-forward. If
the mouse is moved far enough, create a new Net. The Net end-points
are at the connection point in the Terminal, and under the cursor.
- A newly created Net starts in the Dragging state. The diagram
does not distinguish which end of the Net is being manipulated. When
the cursor moves over a suitable target object, the net snaps to the
connection point of that target. If then released, the net remains
connected. The create edge action creates an Edge in the
underlying graph if both ends are connected.
- The Resisting state is used if a connected end of the Net
is grabbed -- as long as the mouse stays "close" to the connected
terminal, it remains connected, but if it moves far enough away, it
disconnects and moves into the Dragging state.
- A pinned grapple is one that is not deleted when the
Net is deselected. Pinned grapples are placed on the disconnected ends
of nets so that they can be reconnected with a single action.
(Otherwise two actions would be needed: select Net, and then click and
drag on a grapple.)
- A net moves between the Selected and Deselected states by
the regular mechanism (clicking on items, or dragging a rectangle on
the background). Selecting a Net places Grapples on both ends.
- The Preparing state captures the need to create a Junction by
clicking and dragging a Net. If a Net is clicked and the cursor moved
far enough, the Net splits into two, a Junction created between them,
and a new Net created in the Dragging state.
JohnR, 18 Oct 97