Appearance
xgis-cesium / DomUtil
Class: DomUtil
Defined in: src/utils/DomUtil.ts:10
Dom Utils some code reference leaflet https://github.com/Leaflet/Leaflet/tree/master/src/core
Constructors
new DomUtil()
new DomUtil():
DomUtil
Returns
Methods
addClass()
static
addClass(el
,name
):void
Defined in: src/utils/DomUtil.ts:96
Parameters
el
any
name
any
Returns
void
Function
Adds name
to the element's class attribute.
create()
static
create(tagName
,className
,container
):any
Defined in: src/utils/DomUtil.ts:45
Creates an HTML element with tagName
, sets its class to className
, and optionally appends it to container
element.
Parameters
tagName
any
className
any
container
any
= null
Returns
any
createSvg()
static
createSvg(width
,height
,path
,container
):SVGElement
Defined in: src/utils/DomUtil.ts:163
Creates svg
Parameters
width
any
height
any
path
any
container
any
Returns
SVGElement
createVideo()
static
createVideo(url
,className
,container
):any
Defined in: src/utils/DomUtil.ts:246
Creates video
Parameters
url
any
className
any
container
any
= null
Returns
any
empty()
static
empty(el
):void
Defined in: src/utils/DomUtil.ts:69
Removes all of el
's children elements from el
Parameters
el
any
Returns
void
enterFullscreen()
static
enterFullscreen(el
):void
Defined in: src/utils/DomUtil.ts:197
enter full screen
Parameters
el
any
Returns
void
exitFullscreen()
static
exitFullscreen():void
Defined in: src/utils/DomUtil.ts:215
exit full screen
Returns
void
get()
static
get(id
):any
Defined in: src/utils/DomUtil.ts:17
Returns an element given its DOM id, or returns the element itself if it was passed directly.
Parameters
id
any
Returns
any
getClass()
static
getClass(el
):any
Defined in: src/utils/DomUtil.ts:144
Parameters
el
any
Returns
any
Function
Returns the element's class.
getStyle()
static
getStyle(el
,style
):any
Defined in: src/utils/DomUtil.ts:28
Returns the value for a certain style attribute on an element, including computed values or values set through CSS.
Parameters
el
any
style
any
Returns
any
hasClass()
static
hasClass(el
,name
):any
Defined in: src/utils/DomUtil.ts:80
Returns true
if the element's class attribute contains name
.
Parameters
el
any
name
any
Returns
any
parseDom()
static
parseDom(domStr
,withWrapper
,className
):HTMLDivElement
|NodeListOf
<ChildNode
>
Defined in: src/utils/DomUtil.ts:185
Parses string to Dom
Parameters
domStr
any
withWrapper
any
className
any
Returns
HTMLDivElement
| NodeListOf
<ChildNode
>
remove()
static
remove(el
):void
Defined in: src/utils/DomUtil.ts:58
Removes el
from its parent element
Parameters
el
any
Returns
void
removeClass()
static
removeClass(el
,name
):void
Defined in: src/utils/DomUtil.ts:113
Parameters
el
any
name
any
Returns
void
Function
Removes name
from the element's class attribute.
setClass()
static
setClass(el
,name
):void
Defined in: src/utils/DomUtil.ts:131
Sets the element's class.
Parameters
el
any
name
any
Returns
void