Space Class
Describes a space inside or around something like a margin or padding.
Methods
fromArray
(
static
-
array
Creates a new space object from an array of coordinates.
Parameters:
-
arrayNumber- An array of coordinates (left, top right, bottom).
set
(
-
left -
top -
right -
bottom
Sets the coordinates of the space.
Parameters:
-
leftNumber- Space at the left in pixels.
-
topNumber- Space at the top in pixels.
-
rightNumber- Space at the right in pixels.
-
bottomNumber- Space at the bottom in pixels.
setFromObject
(
-
space
Sets the coordinates of the space by copying them from a specified space.
Parameters:
-
spaceObject- A space to copy.
Properties
bottom
Number
Space at the bottom in pixels.
left
Number
Space at the left in pixels.
right
Number
Space at the right in pixels.
top
Number
Space at the top in pixels.
