Search…
⌃K
Links

API

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

CanvasCreator

Ƭ CanvasCreator: function

Type declaration:

▸ (options: CanvasCreatorOptions): Canvas
Parameters:
Name
Type
options

DeepReadonly

Ƭ DeepReadonly: T extends Primitive ? T : DeepReadonlyObject‹T›

DeepReadonlyObject

Ƭ DeepReadonlyObject: object

Type declaration:

DimensionInput

Ƭ DimensionInput: string | number | undefined | null

FontStyle

Ƭ FontStyle: "normal" | "italic" | "oblique"

FontVariant

Ƭ FontVariant: "normal" | "small-caps"

FontWeight

Ƭ FontWeight: "normal" | "bold" | "bolder" | "lighter" | 100 | "100" | 200 | "200" | 300 | "300" | 400 | "400" | 500 | "500" | 600 | "600" | 700 | "700" | 800 | "800" | 900 | "900"

Id

Ƭ Id: number | string

ImageClass

Ƭ ImageClass: object

Type declaration:

OnAreaSelectListener

Ƭ OnAreaSelectListener: function

Type declaration:

▸ (areaSelectEvent: AreaSelectEvent): boolean
Parameters:
Name
Type
areaSelectEvent

OnDragListener

Ƭ OnDragListener: function

Type declaration:

▸ (dragEvent: DragEvent): boolean
Parameters:
Name
Type
dragEvent
DragEvent

OnScaleListener

Ƭ OnScaleListener: function

Type declaration:

▸ (scaleEvent: ScaleEvent): boolean
Parameters:
Name
Type
scaleEvent

Primitive

Ƭ Primitive: string | number | boolean | undefined | null

RadiusInput

Ƭ RadiusInput: number | Partial‹Radius› | null | undefined

RectInput

Ƭ RectInput: RectObjectInput | number

RectLike

Ƭ RectLike: Rect | RectInput

SupportedDomPointerEvent

Ƭ SupportedDomPointerEvent: MouseEvent | WheelEvent | TouchEvent

Variables

Const DEBUG_POINTER_EVENTS

DEBUG_POINTER_EVENTS: false = false

Const DEFAULT_POINTER_COUNT

DEFAULT_POINTER_COUNT: 1 = 1

Const MATCH_PARENT

MATCH_PARENT: -1 = -1

Const PARENT_ID

PARENT_ID: -1 = -1

Const WHEEL_SCROLL_SPAN

WHEEL_SCROLL_SPAN: 100 = 100

Const WRAP_CONTENT

WRAP_CONTENT: -2 = -2

Const colorRegex

colorRegex: RegExp‹› = /^(?:#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2}))|(?:#([0-9a-f])([0-9a-f])([0-9a-f]))|(?:rgb((\d+),\s*(\d+),\s*(\d+)))|(?:rgba((\d+),\s*(\d+),\s*(\d+),\s*(\d*.?\d+)))$/i

Const defaultImageClass

defaultImageClass: undefined | object = (() => { try { // Browsers default return Image; } catch { return undefined; } })()

Const defaultLayoutProps

defaultLayoutProps: LayoutProps = new LayoutParams().asProps()

Const isBrowser

isBrowser: false | requestAnimationFrame & requestAnimationFrame = typeof window !== 'undefined' && window.requestAnimationFrame

Const supportedDomPointerEvents

supportedDomPointerEvents: ("touchmove" | "mousemove" | "mousedown" | "touchstart" | "mouseover" | "mouseenter" | "touchcancel" | "mouseout" | "mouseup" | "touchend" | "wheel")[] = [ 'touchmove', 'mousemove', 'mousedown', 'touchstart', 'mouseover', 'mouseenter', 'touchcancel', 'mouseout', 'mouseup', 'touchend', 'wheel', ]

Functions

Const calcDimension

calcDimension(dimension: Dimension, parentDimension: number): undefined | number
Parameters:
Name
Type
dimension
Dimension
parentDimension
number
Returns: undefined | number

Const createEventDispatcher

createEventDispatcher(view: View): EventListener
Parameters:
Name
Type
view
View
Returns: EventListener

createLayoutMap

createLayoutMapK›(t: Record‹K, LayoutProps›): object
Type parameters:
K: string
Parameters:
Name
Type
t
Record‹K, LayoutProps
Returns: object

Const deepFreeze

deepFreezeT›(object: T): DeepReadonly‹T›
Type parameters:
T
Parameters:
Name
Type
object
T
Returns: DeepReadonly‹T›

Const defaultCanvasCreator

defaultCanvasCreator(__namedParameters: object): HTMLCanvasElement
Parameters:
__namedParameters: object
Name
Type
height
number
width
number
Returns: HTMLCanvasElement

Const domEventToPointerAction

domEventToPointerAction(event: Event): PointerAction | undefined
Parameters:
Name
Type
event
Event
Returns: PointerAction | undefined

Const existingNonParentDependency

existingNonParentDependency(id: undefined | Id): id is number
Parameters:
Name
Type
id
undefined | Id
Returns: id is number

Const fillPointerEventData

fillPointerEventData(pointerEvent: CanvasPointerEvent, view: View, event: Event): void
Parameters:
Name
Type
pointerEvent
view
View
event
Event
Returns: void

Const getBox

getBox(width: number, height: number, scale: number): object
Parameters:
Name
Type
width
number
height
number
scale
number
Returns: object
  • str: string = +
  • style: string = font-size: 1px; padding: ${isSafari() ? height * scale / 2 : 0}px ${Math.floor(width * scale / 2)}px; color: transparent; line-height: ${height * scale}px;

Const getElementOffset

getElementOffset(element: HTMLElement, offset: Offset): Offset
Parameters:
Name
Type
element
HTMLElement
offset
Offset
Returns: Offset

Const horizontalLayoutDependencies

horizontalLayoutDependencies(lp: LayoutParams): number[]
Parameters:
Name
Type
lp
Returns: number[]

Const isBright

isBright(color: Color): boolean
Parameters:
Name
Type
color
Color
Returns: boolean

Const isChrome

isChrome(): boolean
Returns: boolean

Const isMouseEvent

isMouseEvent(event: Event): event is MouseEvent
Parameters:
Name
Type
event
Event
Returns: event is MouseEvent

Const isSafari

isSafari(): boolean
Returns: boolean

Const isTouchEvent

isTouchEvent(event: Event): event is TouchEvent
Parameters:
Name
Type
event
Event
Returns: event is TouchEvent

Const isWheelEvent

isWheelEvent(event: Event): event is WheelEvent
Parameters:
Name
Type
event
Event
Returns: event is WheelEvent

Const logPointerEvent

logPointerEvent(pointerEvent: CanvasPointerEvent): void
Parameters:
Name
Type
pointerEvent
Returns: void

Const logScreenshot

logScreenshot(view: View, scale: number): void
Parameters:
Name
Type
Default
view
View
-
scale
number
1
Returns: void

Const luminance

luminance(c: Color): number
Parameters:
Name
Type
c
Color
Returns: number

Const mouseToPointer

mouseToPointer(event: MouseEvent, offset: Offset, canvasPointer: CanvasPointer): void
Parameters:
Name
Type
event
MouseEvent
offset
Offset
canvasPointer
Returns: void

Const noContextError

noContextError(): Error
Returns: Error

Const normalizeRadius

normalizeRadius(radius: RadiusInput): Radius
Parameters:
Name
Type
radius
Returns: Radius

Const parseColor

parseColor(colorString: string | undefined): typeof colorString extends undefined ? undefined : Color | undefined
Parameters:
Name
Type
colorString
string | undefined
Returns: typeof colorString extends undefined ? undefined : Color | undefined

Const parseDimension

parseDimension(value: DimensionInput): Dimension
Parameters:
Name
Type
value
Returns: Dimension

Const parseFont

parseFont(__namedParameters: object): string
Parameters:
__namedParameters: object
Name
Type
fontFamily
string
fontSize
number
fontStyle
undefined | "normal" | "italic" | "oblique"
fontVariant
undefined | "normal" | "small-caps"
fontWeight
undefined | "normal" | "bold" | "bolder" | "lighter" | 100 | "100" | 200 | "200" | 300 | "300" | 400 | "400" | 500 | "500" | 600 | "600" | 700 | "700" | 800 | "800" | 900 | "900"
Returns: string

Const registerEventDispatcher

registerEventDispatcher(element: Element, dispatcher: EventListener): (Anonymous function)
Parameters:
Name
Type
element
Element
dispatcher
EventListener
Returns: (Anonymous function)

Const removeDefaultProps

removeDefaultProps(props: LayoutProps): any
Parameters:
Name
Type
props
Returns: any

Const removeEqualProps

removeEqualProps(object: any, defaultObject: any): any
Parameters:
Name
Type
object
any
defaultObject
any
Returns: any

Const removeUndefinedProps

removeUndefinedProps(object: any): any
Parameters:
Name
Type
object
any
Returns: any

Const resolveDimensionDependencies

resolveDimensionDependenciesT›(children: T[], dependencySelector: function, context: Context): T[]
Type parameters:
T: ViewLike
Parameters:
children: T[]
dependencySelector: function
▸ (lp: LayoutParams): number[]
Parameters:
Name
Type
lp
context: Context