Methods
public static addClass( el: HTMLElement , name: string )
Defined in leaflet/leaflet.d.ts:665
Adds name to the element's class attribute.
Parameters
el: HTMLElement
name: string
public static create( tagName: string , className: string , container?: HTMLElement ) : HTMLElement
Defined in leaflet/leaflet.d.ts:645
Creates an element with tagName, sets the className, and optionally appends
it to container element.
Parameters
tagName: string
className: string
container?: HTMLElement optional
Returns
HTMLElement
public static disableTextSelection( )
Defined in leaflet/leaflet.d.ts:650
Makes sure text cannot be selected, for example during dragging.
public static enableTextSelection( )
Defined in leaflet/leaflet.d.ts:655
Makes text selection possible again.
public static get( id: string ) : HTMLElement
Defined in leaflet/leaflet.d.ts:628
Returns an element with the given id if a string was passed, or just returns
the element if it was passed directly.
Parameters
Returns
HTMLElement
public static getPosition( el: HTMLElement ) : Point
Defined in leaflet/leaflet.d.ts:708
Returns the coordinates of an element previously positioned with setPosition.
Parameters
Returns
Point
public static getScaleString( scale: number , origin: Point ) : string
Defined in leaflet/leaflet.d.ts:695
Returns a CSS transform string to scale an element (with the given scale origin).
Parameters
Returns
string
public static getStyle( el: HTMLElement , style: string ) : string
Defined in leaflet/leaflet.d.ts:634
Returns the value for a certain style attribute on an element, including
computed values or values set through CSS.
Parameters
el: HTMLElement
style: string
Returns
string
public static getTranslateString( point: Point ) : string
Defined in leaflet/leaflet.d.ts:690
Returns a CSS transform string to move an element by the offset provided in
the given point. Uses 3D translate on WebKit for hardware-accelerated transforms
and 2D on other browsers.
Parameters
Returns
string
public static getViewportOffset( el: HTMLElement ) : Point
Defined in leaflet/leaflet.d.ts:639
Returns the offset to the viewport for the requested element.
Parameters
Returns
Point
public static hasClass( el: HTMLElement , name: string ) : boolean
Defined in leaflet/leaflet.d.ts:660
Returns true if the element class attribute contains name.
Parameters
el: HTMLElement
name: string
Returns
boolean
public static removeClass( el: HTMLElement , name: string )
Defined in leaflet/leaflet.d.ts:670
Removes name from the element's class attribute.
Parameters
el: HTMLElement
name: string
public static setOpacity( el: HTMLElement , value: number )
Defined in leaflet/leaflet.d.ts:676
Set the opacity of an element (including old IE support). Value must be from
0 to 1.
Parameters
el: HTMLElement
value: number
public static setPosition( el: HTMLElement , point: Point , disable3D?: boolean )
Defined in leaflet/leaflet.d.ts:703
Sets the position of an element to coordinates specified by point, using
CSS translate or top/left positioning depending on the browser (used by
Leaflet internally to position its layers). Forces top/left positioning
if disable3D is true.
Parameters
el: HTMLElement
disable3D?: boolean optional
public static testProp( props: Array<string> ) : any
Defined in leaflet/leaflet.d.ts:683
Goes through the array of style names and returns the first name that is a valid
style name for an element. If no such name is found, it returns false. Useful
for vendor-prefixed styles like transform.
Parameters
Returns
any