Header menu logo issie

SheetDisplay Module

Nested modules

Modules Description

Constants

Functions and values

Function or value Description

displaySvgWithZoom model headerHeight style svgReact dispatch

Full Usage: displaySvgWithZoom model headerHeight style svgReact dispatch

Parameters:
Returns: ReactElement

This function zooms an SVG canvas by transforming its content and altering its size. Currently the zoom expands based on top left corner.

model : Model
headerHeight : float
style : CSSProp list
svgReact : List<ReactElement>
dispatch : Dispatch<Msg>
Returns: ReactElement

getActivePressedKeys model

Full Usage: getActivePressedKeys model

Parameters:
Returns: (string * float) list

Hack to deal with possible Ctrl Key up when window is not focussed. This will not register as a keyup and so will stay in CurrentKeyPresses forever. Use the fact that keys auto-repeat, and time-stamp each KeyDown. If the mots recent keydown is longer than some cutoff time assume key is no longer pressed.

model : Model
Returns: (string * float) list

getDrawBlockPos ev headerHeight sheetModel

Full Usage: getDrawBlockPos ev headerHeight sheetModel

Parameters:
Returns: XYPos
ev : MouseEvent
headerHeight : float
sheetModel : Model
Returns: XYPos

mDown ev

Full Usage: mDown ev

Parameters:
Returns: bool

Is the mouse button currently down?

ev : MouseEvent
Returns: bool

mouseOp op ev dispatch headerHeight

Full Usage: mouseOp op ev dispatch headerHeight

Parameters:

Dispatch a MouseMsg (compensated for zoom)

op : MouseOp
ev : MouseEvent
dispatch : Msg -> unit
headerHeight : float

view model headerHeight style dispatch

Full Usage: view model headerHeight style dispatch

Parameters:
    model : Model
    headerHeight : float
    style : CSSProp list
    dispatch : Msg -> unit

Returns: ReactElement

View function, displays symbols / wires and possibly also a grid / drag-to-select box / connecting ports line / snap-to-grid visualisation

model : Model
headerHeight : float
style : CSSProp list
dispatch : Msg -> unit
Returns: ReactElement

wheelUpdate ev model dispatch

Full Usage: wheelUpdate ev model dispatch

Parameters:
ev : WheelEvent
model : Model
dispatch : Msg -> unit

wheelUpdateMsg ev dispatch

Full Usage: wheelUpdateMsg ev dispatch

Parameters:
Returns: Msg
ev : WheelEvent
dispatch : Msg -> unit
Returns: Msg

writeCanvasScroll scrollPos

Full Usage: writeCanvasScroll scrollPos

Parameters:
Returns: HTMLElement option

This actually writes to the DOM a new scroll position. In the special case that DOM has not yet been created it does nothing.

scrollPos : XYPos
Returns: HTMLElement option

Type something to start searching.