Sheet Module
Types and nested modules
Functions and values
| Function or value | Description |
Full Usage:
addBoxMargin fractionalMargin absoluteMargin box
Parameters:
float
absoluteMargin : float
box : BoundingBox
Returns: BoundingBox
|
|
|
|
Full Usage:
arrayBox dir copies box
Parameters:
ArrayDirection
copies : int
box : BoundingBox
Returns: BoundingBox
|
|
|
|
Full Usage:
arrayIsAgainstShape dir box
Parameters:
ArrayDirection
box : BoundingBox
Returns: bool
|
|
Full Usage:
arrayOffset dir box i
Parameters:
ArrayDirection
box : BoundingBox
i : int
Returns: XYPos
|
|
|
|
Full Usage:
boxPointUnion box point
Parameters:
BoundingBox
point : XYPos
Returns: BoundingBox
|
|
|
|
|
|
|
|
|
The bounding box of what is on the clipboard, or None when nothing has been copied. Labels are included, and have to be: a label sits below its symbol, so a fragment measured without them leaves a gap that the label of one copy hangs into the next through. A single copied component is the case that shows it - symbolBBUnion takes the first symbol's box without its label, which for one symbol is the whole answer. Recalculated rather than read off the symbol, as symbolWireBBUnion does: the stored box is only as fresh as whatever last set it, and these symbols were put aside when they were copied.
|
|
|
Full Usage:
findIntersectingComponents model box1
Parameters:
Model
box1 : BoundingBox
Returns: ComponentId list
|
|
|
|
|
|
Full Usage:
findNearbyPorts model
Parameters:
Model
Returns: (InputPortId * XYPos) list * (OutputPortId * XYPos) list
|
|
|
|
Full Usage:
fitInsetFor menuWidth width height
Parameters:
float
width : float
height : float
Returns: float
|
How much of the left of a `width` by `height` drawing area a fit should leave to a menu `menuWidth` wide: all of it, unless what is left over is a slot more than Constants.maxFitAspectRatio times as tall as it is wide (or as wide as tall), where going round the menu would shrink the circuit further than the menu ever hides it.
|
|
The window a fit should use, for the whole Issie model - which is what says whether the Sheet menu is pinned. The draw block is handed this rather than working it out, because Model.SheetMenuPinned is not draw block state: see SheetUpdate.update, which is given the whole model for exactly this. None when there is no canvas to measure, which is what the fit used to return None for.
|
|
|
|
|
Full Usage:
getWindowParasToFitBox win box
Parameters:
FitWindow
box : BoundingBox
Returns: (type)
|
|
|
|
Full Usage:
insideBox pos boundingBox
Parameters:
XYPos
boundingBox : BoundingBox
Returns: bool
|
|
Full Usage:
insideBoxMap boundingBoxes pos
Parameters:
Map<ComponentId, BoundingBox>
pos : XYPos
Returns: Option<ComponentId>
Modifiers: inline |
|
Full Usage:
isAllVisible model conns comps
Parameters:
Model
conns : ConnectionId list
comps : ComponentId list
Returns: bool
|
|
|
Whether the sheet is still exactly where a fit to `win` would put it, and so has not been scrolled, zoomed or edited since one. Undoing a fit - as unpinning the Sheet menu does - is only ever right for a view the fit itself chose: once the user has moved it, it is theirs. A second fit of an already fitted circuit is a no-op, since the circuit is centred on the canvas already and the same box gives the same magnification, so this can ask by computing one. Compared against where the canvas is actually scrolled to, not against the model's record of it: a fit that asks to scroll past a canvas edge gets what the browser allows instead, and it is that the user is looking at.
|
Full Usage:
isBBoxAllVisible model bb
Parameters:
Model
bb : BoundingBox
Returns: bool option
|
|
|
|
Full Usage:
maxArrayCopies dir canvasSize box
Parameters:
ArrayDirection
canvasSize : float
box : BoundingBox
Returns: int
|
|
|
|
|
|
|
|
Full Usage:
notIntersectingComponents model box1 inputId
Parameters:
Model
box1 : BoundingBox
inputId : ComponentId
Returns: bool
|
|
Full Usage:
notIntersectingSelectedComponents model box1 inputId
Parameters:
Model
box1 : BoundingBox
inputId : ComponentId
Returns: bool
|
|
Full Usage:
openSheetMenuWidth ()
Parameters:
unit
Returns: float
|
|
|
|
|
|
|
|
Full Usage:
scrollSequence
Returns: int
|
|
|
|
|
|
Full Usage:
symDiff lst1 lst2
Parameters:
'a list
lst2 : 'a list
Returns: 'a list
|
|
Full Usage:
symbolBBUnion centresOnly symbols
Parameters:
bool
symbols : Symbol list
Returns: BoundingBox option
|
|
|
|
Full Usage:
symbolToBB centresOnly symbol
Parameters:
bool
symbol : Symbol
Returns: BoundingBox
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
viewIsAfterUpdateScroll
Returns: bool
|
|
Full Usage:
wheelZoom deltaMode deltaY isZoomGesture physicalModifierHeld
Parameters:
float
deltaY : float
isZoomGesture : bool
physicalModifierHeld : bool
Returns: WheelZoom option
|
|
|
|
|
|