Module
Hylograph.Brush.Types
- Package
- purescript-hylograph-selection
- Repository
- afcondon/purescript-hylograph-selection
D3 Brush Types
Types for brush selection and configuration.
#BrushSelection Source
data BrushSelectionBrush selection - the rectangular region selected by the user
For 2D brush: x0, y0 (top-left) to x1, y1 (bottom-right) For 1D brush: only x0/x1 or y0/y1 are meaningful
Constructors
Selection2D { x0 :: Number, x1 :: Number, y0 :: Number, y1 :: Number }SelectionX { x0 :: Number, x1 :: Number }SelectionY { y0 :: Number, y1 :: Number }NoSelection
Instances
#BrushExtent Source
type BrushExtent = { x0 :: Number, x1 :: Number, y0 :: Number, y1 :: Number }Extent for brush (defines the brushable area)
#BrushConfig Source
type BrushConfig = { extent :: BrushExtent, onBrush :: Maybe (BrushEvent -> Effect Unit), onEnd :: Maybe (BrushEvent -> Effect Unit), onStart :: Maybe (BrushEvent -> Effect Unit) }Configuration for creating a brush
- extent: The brushable area bounds
- onStart: Called when brush gesture starts
- onBrush: Called during brush gesture (as selection changes)
- onEnd: Called when brush gesture ends
#BrushEvent Source
type BrushEvent = { selection :: BrushSelection }Brush event passed to handlers
#defaultBrushConfig Source
defaultBrushConfig :: BrushConfigDefault brush configuration
Extent covers 0,0 to 100,100 with no handlers. Override as needed.
#isInSelection Source
isInSelection :: Number -> Number -> BrushSelection -> BooleanCheck if a point is within a 2D brush selection
Returns true if the point (x, y) is inside the selection bounds. Returns false for 1D selections or NoSelection.
#selectionWidth Source
selectionWidth :: BrushSelection -> NumberGet the width of a brush selection
#selectionHeight Source
selectionHeight :: BrushSelection -> NumberGet the height of a brush selection
- Modules
- Data.
DependencyGraph - Hylograph.
AST - Hylograph.
Axis. Axis - Hylograph.
Brush - Hylograph.
Brush. FFI - Hylograph.
Brush. Types - Hylograph.
Classify - Hylograph.
Data. Graph - Hylograph.
Data. Graph. Algorithms - Hylograph.
Data. Node - Hylograph.
Data. Tree - Hylograph.
Expr. Animation - Hylograph.
Expr. Attr - Hylograph.
Expr. Datum - Hylograph.
Expr. Expr - Hylograph.
Expr. Friendly - Hylograph.
Expr. Integration - Hylograph.
Expr. Interpreter. CodeGen - Hylograph.
Expr. Interpreter. Eval - Hylograph.
Expr. Interpreter. Meta - Hylograph.
Expr. Interpreter. PureSVG - Hylograph.
Expr. Interpreter. SVG - Hylograph.
Expr. Path - Hylograph.
Expr. Path. Generators - Hylograph.
Expr. Sugar - Hylograph.
Expr. Units - Hylograph.
HATS - Hylograph.
HATS. Friendly - Hylograph.
HATS. InterpreterTick - Hylograph.
HATS. Transitions - Hylograph.
Interaction. Brush - Hylograph.
Interaction. Coordinated - Hylograph.
Interaction. Pointer - Hylograph.
Interaction. Zoom - Hylograph.
Internal. Attribute - Hylograph.
Internal. Behavior. FFI - Hylograph.
Internal. Behavior. Types - Hylograph.
Internal. Capabilities. Selection - Hylograph.
Internal. Capabilities. Transition - Hylograph.
Internal. FFI - Hylograph.
Internal. Selection. Join - Hylograph.
Internal. Selection. Operations - Hylograph.
Internal. Selection. Operations. Conversions - Hylograph.
Internal. Selection. Operations. Helpers - Hylograph.
Internal. Selection. Operations. Selection - Hylograph.
Internal. Selection. Query - Hylograph.
Internal. Selection. Types - Hylograph.
Internal. Transition. FFI - Hylograph.
Internal. Transition. Manager - Hylograph.
Internal. Transition. Scene - Hylograph.
Internal. Transition. Types - Hylograph.
Internal. Types - Hylograph.
Interpreter. D3 - Hylograph.
Interpreter. English - Hylograph.
Interpreter. Mermaid - Hylograph.
Interpreter. MetaAST - Hylograph.
Interpreter. SemiQuine - Hylograph.
Interpreter. SemiQuine. TreeToCode - Hylograph.
Interpreter. SemiQuine. Types - Hylograph.
Render - Hylograph.
Scale - Hylograph.
Scale. FP - Hylograph.
Shape. Arc - Hylograph.
Shape. Pie - Hylograph.
Shape. Polygon - Hylograph.
Tooltip - Hylograph.
Transform - Hylograph.
TreeDSL - Hylograph.
TreeDSL. ShapeTree - Hylograph.
Unified - Hylograph.
Unified. Attribute - Hylograph.
Unified. DataDSL - Hylograph.
Unified. Display - Hylograph.
Unified. Examples - Hylograph.
Unified. Join - Hylograph.
Unified. Sugar