Home Reference Source
import util from 'mapbox-plugins/src/util.js'
public class | source

util

Static Method Summary

Static Public Methods
public static

debounce(fn: *, delay: *): Function

public static

deepClone(obj: *): *

public static
public static

getFiletype(uri: *): string

public static

getJSON(url: *, resolve: *, reject: *): *

return promise obj.

public static

isChanged(lastData: *, data: *): boolean

public static

loadImageAsync(url: *, resolve: *, reject: *): *

compared with traditional imageload.

public static

log(target: *, name: *, descriptor: *)

target.descriptor..

public static

rdObjs(num: *, mapCenter: *): *

public static

readonly(target: *, name: *, descriptor: *): *

This decorator func.

public static

setChart(dom: *, data: *, type: *, height: *)

public static

setIconDiv(dom: *, iconName: *)

return iconposition style by iconName

public static

setResource(dom,: *domEle, res,: *Array)

add img, video element to domContainer.

Static Public Methods

public static debounce(fn: *, delay: *): Function source

Params:

NameTypeAttributeDescription
fn *

{Function}

delay *

{Number}

Return:

Function

public static deepClone(obj: *): * source

Params:

NameTypeAttributeDescription
obj *

Return:

*

public static getAnimationFrame() source

public static getFiletype(uri: *): string source

Params:

NameTypeAttributeDescription
uri *

Return:

string

public static getJSON(url: *, resolve: *, reject: *): * source

return promise obj.

Params:

NameTypeAttributeDescription
url *
resolve *
reject *

Return:

*

public static isChanged(lastData: *, data: *): boolean source

Params:

NameTypeAttributeDescription
lastData *
data *

Return:

boolean

public static loadImageAsync(url: *, resolve: *, reject: *): * source

compared with traditional imageload. what is the advantage ?

Params:

NameTypeAttributeDescription
url *
resolve *
reject *

Return:

*

public static log(target: *, name: *, descriptor: *) source

target.descriptor.. this decorator used for log before calling target function.

Params:

NameTypeAttributeDescription
target *
name *
descriptor *

public static rdObjs(num: *, mapCenter: *): * source

Params:

NameTypeAttributeDescription
num *
mapCenter *

Return:

*

public static readonly(target: *, name: *, descriptor: *): * source

This decorator func.

Params:

NameTypeAttributeDescription
target *
name *
descriptor *

Return:

*

public static setChart(dom: *, data: *, type: *, height: *) source

Params:

NameTypeAttributeDescription
dom *
data *
type *
height *

public static setIconDiv(dom: *, iconName: *) source

return iconposition style by iconName

Params:

NameTypeAttributeDescription
dom *
iconName *

public static setResource(dom,: *domEle, res,: *Array) source

add img, video element to domContainer.

Params:

NameTypeAttributeDescription
dom, *domEle

dom container..

res, *Array

urls of img/video loaded to dom.