API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classObservableSize

@codexo/exojs / math / stable

A Size subclass that fires a callback whenever `width` or `height` changes. Used internally by layout-aware types to invalidate cached geometry on dimension mutations. Batch mutations via `set()` fire at most one callback per call.

4
props
9
methods
0
events
Import
import { ObservableSize } from '@codexo/exojs'

A Size subclass that fires a callback whenever `width` or `height` changes. Used internally by layout-aware types to invalidate cached geometry on dimension mutations.

Batch mutations via `set()` fire at most one callback per call.

Constructors1
new(callback: () => void, width: number, height: number): ObservableSize
Methods9
add(x: number, y: number): this
A plain, callback-free Size. A clone is a value, not a second observer of this size's owner: mutating the copy must not invalidate geometry that belongs to something else. The return type says so, so a caller cannot mistake the copy for a live one.
destroy(): void
divide(x: number, y: number): this
scale(x: number, y: number): this
set(width: number, height: number): this
subtract(x: number, y: number): this
Properties4
height: number
width: number
Source