Class EdgeInsets
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
Optionaltop: numberOptionalbottom: numberOptionalleft: numberOptionalright: number
Returns EdgeInsets
Methods
clone
Returns EdgeInsets
equals
Parameters
- other: PaddingOptions
Returns boolean
getCenter
Utility method that computes the new apparent center or vanishing point after applying insets. This is in pixels and with the top left being (0.0) and +y being downwards.
Parameters
- width: number
the width
- height: number
the height
Returns Point
the point
- width: number
interpolate
Interpolates the inset in-place. This maintains the current inset value for any inset not present in
target.Parameters
- start: EdgeInsets | PaddingOptions
interpolation start
- target: PaddingOptions
interpolation target
- t: number
interpolation step/weight
Returns this
the insets
- start: EdgeInsets | PaddingOptions
toJSON
Returns the current state as json, useful when you want to have a read-only representation of the inset.
Returns Complete<PaddingOptions>
state as json
Was this helpful?
An
EdgeInsetobject represents screen space padding applied to the edges of the viewport. This shifts the apparent center or the vanishing point of the map. This is useful for adding floating UI elements on top of the map and having the vanishing point shift as UI elements resize.