Module

Hylograph.Brush.FFI

Package
purescript-hylograph-selection
Repository
afcondon/purescript-hylograph-selection

#attachBrush_ Source

attachBrush_ :: Element -> BrushExtent -> (Nullable BrushSelection2D -> Effect Unit) -> (Nullable BrushSelection2D -> Effect Unit) -> (Nullable BrushSelection2D -> Effect Unit) -> Effect BrushHandle

Attach a 2D brush to an element

Parameters:

  • element: DOM element (typically a <g>) to attach brush to
  • extent: Brushable area bounds
  • onStart: Handler called when brush gesture starts (receives selection or null)
  • onBrush: Handler called during brush gesture (receives selection or null)
  • onEnd: Handler called when brush gesture ends (receives selection or null)

Returns a BrushHandle for programmatic control.

#clearBrush_ Source

clearBrush_ :: BrushHandle -> Effect Unit

Clear the brush selection

#moveBrush_ Source

moveBrush_ :: forall selection. BrushHandle -> Nullable selection -> Effect Unit

Move the brush selection programmatically Pass null to clear

#getBrushSelection_ Source

getBrushSelection_ :: forall selection. BrushHandle -> Effect (Nullable selection)

Get current brush selection

#BrushHandle Source

data BrushHandle

Opaque handle for controlling a brush programmatically

#BrushExtent Source

type BrushExtent = { x0 :: Number, x1 :: Number, y0 :: Number, y1 :: Number }

Extent for brush (defines the brushable area)

#BrushSelection2D Source

type BrushSelection2D = { x0 :: Number, x1 :: Number, y0 :: Number, y1 :: Number }

2D brush selection (for brush())

#BrushSelectionX Source

type BrushSelectionX = { x0 :: Number, x1 :: Number }

1D horizontal brush selection (for brushX())

#BrushSelectionY Source

type BrushSelectionY = { y0 :: Number, y1 :: Number }

1D vertical brush selection (for brushY())

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