Header menu logo issie

SymbolPortHelpers Module

Functions and values

Function or value Description

deleteAllPorts model

Full Usage: deleteAllPorts model

Parameters:
Returns: Model
Modifiers: inline

Given a model it hides all ports and returns the updated model

model : Model
Returns: Model

findDeletedPorts symModel compId oldComp newComp

Full Usage: findDeletedPorts symModel compId oldComp newComp

Parameters:
Returns: Port option list

Helper function to find which ports were deleted when changing Adder & Counter component type via properties

symModel : Model
compId : ComponentId
oldComp : Component
newComp : ComponentType
Returns: Port option list

getCloseByEdge sym mousePos

Full Usage: getCloseByEdge sym mousePos

Parameters:
Returns: Option<Edge>

Returns an Option Edge. Returns Some edge if position is on edge of Symbol, and None if it was not on an edge Separates the symbol as shown below where the two triangles have height = 0.3*symbolHeight

sym : Symbol
mousePos : XYPos
Returns: Option<Edge>

getPosIndex sym pos edge

Full Usage: getPosIndex sym pos edge

Parameters:
Returns: int

Given a symbol and a port, it returns the offset of the port from the top left corner of the symbol

sym : Symbol
pos : XYPos
edge : Edge
Returns: int

hideSymbolPorts arg1 sym

Full Usage: hideSymbolPorts arg1 sym

Parameters:
Returns: Symbol
arg0 : 'a
sym : Symbol
Returns: Symbol

moveCustomPortsPopup ()

Full Usage: moveCustomPortsPopup ()

Parameters:
    () : unit

Returns: ReactElement
() : unit
Returns: ReactElement

movePortUpdate model portId pos

Full Usage: movePortUpdate model portId pos

Parameters:
Returns: Model * Cmd<'a>

Contains the code for the MovePort update msg

model : Model
portId : string
pos : XYPos
Returns: Model * Cmd<'a>

showAllCustomPorts model

Full Usage: showAllCustomPorts model

Parameters:
Returns: Model
Modifiers: inline

Given a model it shows all ports of custom components and hides all other ports, then returns the updated model

model : Model
Returns: Model

showAllInputPorts model

Full Usage: showAllInputPorts model

Parameters:
Returns: Model
Modifiers: inline

Given a model it shows all input ports and hides all output ports, then returns the updated model

model : Model
Returns: Model

showAllOutputPorts model

Full Usage: showAllOutputPorts model

Parameters:
Returns: Model
Modifiers: inline

Given a model it shows all output ports and hides all input ports, then returns the updated model

model : Model
Returns: Model

showCustomPorts model compList

Full Usage: showCustomPorts model compList

Parameters:
Returns: Model
Modifiers: inline

Given a model it shows only the custom components of all the specified components' ports and hides all the other ones Different from the above (only custom components).

model : Model
compList : ComponentId list
Returns: Model

showPorts model compList

Full Usage: showPorts model compList

Parameters:
Returns: Model
Modifiers: inline

Given a model it shows all the specified components' ports and hides all the other ones

model : Model
compList : ComponentId list
Returns: Model

showSymbolBothForPortMovementPorts arg1 sym

Full Usage: showSymbolBothForPortMovementPorts arg1 sym

Parameters:
Returns: Symbol
arg0 : 'a
sym : Symbol
Returns: Symbol

showSymbolInPorts arg1 sym

Full Usage: showSymbolInPorts arg1 sym

Parameters:
Returns: Symbol
arg0 : 'a
sym : Symbol
Returns: Symbol

showSymbolOutPorts arg1 sym

Full Usage: showSymbolOutPorts arg1 sym

Parameters:
Returns: Symbol
arg0 : 'a
sym : Symbol
Returns: Symbol

showSymbolPorts sym

Full Usage: showSymbolPorts sym

Parameters:
Returns: Symbol
sym : Symbol
Returns: Symbol

updatePortPos sym pos portId

Full Usage: updatePortPos sym pos portId

Parameters:
Returns: Symbol
sym : Symbol
pos : XYPos
portId : string
Returns: Symbol

Type something to start searching.