Module

Hylograph.Internal.Transition.FFI

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

Internal: FFI bindings for D3 transitions.

Provides JavaScript FFI for D3's transition API:

  • createTransition_: Create a transition with duration, delay, easing
  • transitionSetAttribute_: Animate an attribute to a target value
  • transitionRemove_: Remove element after transition completes

D3 transitions interpolate attribute values over time, providing smooth animations without manual requestAnimationFrame management.

Internal module - use Hylograph.Transition for the public API.

#D3Transition Source

data D3Transition

Opaque type representing a D3 transition This is returned by D3's .transition() method

#createTransition_ Source

createTransition_ :: Number -> Nullable Number -> Nullable String -> Element -> Effect D3Transition

Create a D3 transition from an element

Calls D3's selection.transition() and configures duration, delay, and easing. Returns a D3 transition object that can be used to set animated attributes.

#transitionSetAttribute_ Source

transitionSetAttribute_ :: String -> String -> D3Transition -> Effect Unit

Set an attribute on a D3 transition

This is similar to Element.setAttribute but works on transitions, causing the attribute to animate to the target value.

#transitionRemove_ Source

transitionRemove_ :: D3Transition -> Effect Unit

Remove elements after transition completes

Calls D3's transition.remove() which schedules the elements to be removed from the DOM after the transition finishes.

#maybeMillisecondsToNullable Source

maybeMillisecondsToNullable :: Maybe Milliseconds -> Nullable Number

Convert Maybe Milliseconds to Nullable Number for FFI

#maybeEasingToNullable Source

maybeEasingToNullable :: Maybe Easing -> Nullable String

Convert Maybe Easing to Nullable String for FFI Uses the Show instance which produces D3-compatible easing names (e.g., "linear", "cubicInOut", "elasticOut")

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