Spacing
Defined in: src/geometry/spacing.ts:2
Immutable per-side spacing (cells), used for margin, padding, and borders.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Spacing(
top?,right?,bottom?,left?):Spacing
Defined in: src/geometry/spacing.ts:3
Parameters
Section titled “Parameters”number = 0
Top inset.
right?
Section titled “right?”number = 0
Right inset.
bottom?
Section titled “bottom?”number = 0
Bottom inset.
number = 0
Left inset.
Returns
Section titled “Returns”Spacing
Properties
Section titled “Properties”bottom
Section titled “bottom”
readonlybottom:number=0
Defined in: src/geometry/spacing.ts:9
Bottom inset.
readonlyleft:number=0
Defined in: src/geometry/spacing.ts:11
Left inset.
readonlyright:number=0
Defined in: src/geometry/spacing.ts:7
Right inset.
readonlytop:number=0
Defined in: src/geometry/spacing.ts:5
Top inset.
readonlystaticZERO:Spacing
Defined in: src/geometry/spacing.ts:15
Zero on every side.
Accessors
Section titled “Accessors”height
Section titled “height”Get Signature
Section titled “Get Signature”get height():
number
Defined in: src/geometry/spacing.ts:23
Total vertical inset (top + bottom).
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get width():
number
Defined in: src/geometry/spacing.ts:18
Total horizontal inset (left + right).
Returns
Section titled “Returns”number
Methods
Section titled “Methods”clone()
Section titled “clone()”clone():
Spacing
Defined in: src/geometry/spacing.ts:38
A copy of this spacing.
Returns
Section titled “Returns”Spacing
equals()
Section titled “equals()”equals(
other):boolean
Defined in: src/geometry/spacing.ts:28
True if all four sides match.
Parameters
Section titled “Parameters”Spacing
Returns
Section titled “Returns”boolean
toString()
Section titled “toString()”toString():
string
Defined in: src/geometry/spacing.ts:43
"[t:… r:… b:… l:…]".
Returns
Section titled “Returns”string