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

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

writeCanvasScroll scrollPos

Full Usage: writeCanvasScroll scrollPos

Parameters:

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

Type something to start searching.