Header menu logo issie

SheetUpdateHelpers Module

Functions and values

Function or value Description

alignPosition symbols isX

Full Usage: alignPosition symbols isX

Parameters:
    symbols : Symbol list
    isX : bool

Returns: Msg list
symbols : Symbol list
isX : bool
Returns: Msg list

appendUndoList undoList model_in

Full Usage: appendUndoList undoList model_in

Parameters:
Returns: List<Model>
undoList : List<Model>
model_in : Model
Returns: List<Model>

arrangeSymbols arrange model

Full Usage: arrangeSymbols arrange model

Parameters:
Returns: Model * Cmd<Msg>
arrange : Arrange
model : Model
Returns: Model * Cmd<Msg>

bbOrientation bb

Full Usage: bbOrientation bb

Parameters:
Returns: (Orientation * float) option
bb : BoundingBox
Returns: (Orientation * float) option

distributePosition symbols isX

Full Usage: distributePosition symbols isX

Parameters:
    symbols : Symbol list
    isX : bool

Returns: Msg list
symbols : Symbol list
isX : bool
Returns: Msg list

fitCircuitToScreenUpdate model

Full Usage: fitCircuitToScreenUpdate model

Parameters:
Returns: Model * Cmd<Msg>
model : Model
Returns: Model * Cmd<Msg>

getChannel bb1 bb2

Full Usage: getChannel bb1 bb2

Parameters:
Returns: (BoundingBox * Orientation) option

Geometric helper used for testing. Probably needs a better name, and to be collected with other This should perhaps be generalised for all orientations and made a helper function. However different testing may be needed, so who knows? Return the vertical channel between two bounding boxes, if they do not intersect and their vertical coordinates overlap.

bb1 : BoundingBox
bb2 : BoundingBox
Returns: (BoundingBox * Orientation) option

getVisibleScreenCentre model

Full Usage: getVisibleScreenCentre model

Parameters:
Returns: XYPos
model : Model
Returns: XYPos

hextoInt s

Full Usage: hextoInt s

Parameters:
    s : string

Returns: int
s : string
Returns: int

injectXY isX f pos

Full Usage: injectXY isX f pos

Parameters:
    isX : bool
    f : float
    pos : XYPos

Returns: XYPos
isX : bool
f : float
pos : XYPos
Returns: XYPos

mDownUpdate model mMsg

Full Usage: mDownUpdate model mMsg

Parameters:
Returns: Model * Cmd<Msg>

Mouse Down Update, Can have clicked on: Label, InputPort / OutputPort / Component / Wire / Canvas. Do correct action for each.

model : Model
mMsg : MouseT
Returns: Model * Cmd<Msg>

mDragUpdate model mMsg

Full Usage: mDragUpdate model mMsg

Parameters:
Returns: Model * Cmd<Msg>

Mouse Drag Update, can be: drag-to-selecting, moving symbols, connecting wire between ports.

model : Model
mMsg : MouseT
Returns: Model * Cmd<Msg>

mMoveUpdate model mMsg

Full Usage: mMoveUpdate model mMsg

Parameters:
Returns: Model * Cmd<Msg>

Mouse Move Update, looks for nearby components and looks if mouse is on a port

model : Model
mMsg : MouseT
Returns: Model * Cmd<Msg>

mUpUpdate model mMsg

Full Usage: mUpUpdate model mMsg

Parameters:
Returns: Model * Cmd<Msg>

Mouse Up Update, can have: finished drag-to-select, pressed on a component, finished symbol movement, connected a wire between ports

model : Model
mMsg : MouseT
Returns: Model * Cmd<Msg>

moveSymbols model mMsg

Full Usage: moveSymbols model mMsg

Parameters:
Returns: Model * Cmd<Msg>

Update function to move symbols in model.SelectedComponents

model : Model
mMsg : MouseT
Returns: Model * Cmd<Msg>

projectXY isX pos

Full Usage: projectXY isX pos

Parameters:
Returns: float
isX : bool
pos : XYPos
Returns: float

rotateLabel sym

Full Usage: rotateLabel sym

Parameters:
Returns: Symbol
sym : Symbol
Returns: Symbol

rotateSelectedLabelsClockwise model

Full Usage: rotateSelectedLabelsClockwise model

Parameters:
Returns: Model * Cmd<'a>
model : Model
Returns: Model * Cmd<'a>

snapWire model mMsg segIdL

Full Usage: snapWire model mMsg segIdL

Parameters:
Returns: Model * Cmd<Msg>

Inputs are segment ID being dragged and new mouse position. Performs the Segment Drag operation implementing snaps. This function must be in update and creates additional commands to implement the drag oeporation.

model : Model
mMsg : MouseT
segIdL : SegmentId list
Returns: Model * Cmd<Msg>

validateTwoSelectedSymbols model

Full Usage: validateTwoSelectedSymbols model

Parameters:
Returns: (Symbol * Symbol) option
model : Model
Returns: (Symbol * Symbol) option

workOutArrangement arrange syms

Full Usage: workOutArrangement arrange syms

Parameters:
Returns: Symbol list * Result<Orientation, string>
arrange : Arrange
syms : Symbol list
Returns: Symbol list * Result<Orientation, string>

Type something to start searching.