BusWire Module
Types and nested modules
Functions and values
| Function or value | Description |
Full Usage:
extractConnection wModel cId
Parameters:
Model
cId : ConnectionId
Returns: Connection
|
|
|
|
Full Usage:
getASegmentFromId model (arg2, arg3)
Parameters:
Model
arg1 : int
arg2 : ConnectionId
Returns: ASegment
Modifiers: inline |
|
|
|
Full Usage:
getSegmentFromId model (arg2, arg3)
Parameters:
Model
arg1 : int
arg2 : ConnectionId
Returns: Segment
Modifiers: inline |
|
Full Usage:
getSegmentOrientation segStart segEnd
Parameters: Returns: Orientation
Modifiers: inline |
|
Full Usage:
getSegmentOrientationOpt segStart segEnd
Parameters: Returns: Orientation option
Modifiers: inline |
|
|
|
Full Usage:
issieVerticesToSegments connId verticesList
Parameters:
ConnectionId
verticesList : (float * float * bool) list
Returns: Segment list
|
|
|
|
Full Usage:
makeInitialSegmentsList hostId startPos endPos portOrientation
Parameters:
ConnectionId
startPos : XYPos
endPos : XYPos
portOrientation : Edge
Returns: Segment list
|
|
Given the coordinates of two port locations that correspond to the endpoints of a wire, as well as the final port orientation this function returns a list of wire vertices. The starting segment will always be from a Right Edge (and so in increasing X direction) The two positions are where the wire LEAVES each symbol's bounding box, which for nearly every port is the port itself. Where it is not - a Mux2's Sel sits nine units inside the box, because the symbol is drawn as a trapezium and the port is on the sloping side - the caller hands this the point on the box and lengthens the two end nubs afterwards, so that everything here works in the space a wire is actually free to use. See BusWireUpdateHelpers.autoroute.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
view model highlighted dispatch
Parameters:
Model
highlighted : Highlighted
dispatch : Dispatch<Msg>
Returns: ReactElement
|
Function that will render all of the wires within the model, with the display type being set in Model.Type `highlighted` says what to show picked out for a reason the draw block cannot know - see DrawModelType.Highlighted. It is applied to the render props rather than to the model, so a wire whose highlight changes redraws and the rest are left to React's memoisation.
|
|
The bends of a radial wire, each paired with the radius its corner is drawn with. A bend eats `rad` off the end of the run either side of it, so a run with a bend at both ends can give half of itself to each, and one at either end of the wire has a single bend and can give all of itself. The radius is therefore the standard one everywhere except where there is genuinely not the room for it: neighbouring bends never overlap, and a short run is the only thing that squares a corner off.
|
Full Usage:
xyVerticesToSegments connId xyVerticesList
Parameters:
ConnectionId
xyVerticesList : XYPos list
Returns: Segment list
|