# Namespace: Dom
# Table of contents
# Type aliases
# Variables
# Functions
- addClass
- addEventListener
- create
- createNS
- disableDrag
- enableDrag
- getClass
- hasClass
- mouseButton
- mousePos
- remove
- removeClass
- removeEventListener
- setClass
- setTransform
- suppressClick
- touchPos
# Type aliases
# Anchor
Ƭ Anchor: "center"
| "top"
| "bottom"
| "left"
| "right"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right"
# Variables
# anchorTranslate
• Const
anchorTranslate: Record<Anchor, string>
# Functions
# addClass
▸ addClass(el
: HTMLElement, name
: string): void
# Parameters
Name | Type |
---|---|
el | HTMLElement |
name | string |
Returns: void
# addEventListener
▸ addEventListener(target
: any, type
: any, callback
: any, options?
: { capture?
: boolean ; passive?
: boolean }): void
# Parameters
Name | Type | Default value |
---|---|---|
target | any | - |
type | any | - |
callback | any | - |
options | object | {} |
options.capture? | boolean | - |
options.passive? | boolean | - |
Returns: void
# create
▸ create(tagName
: string, className?
: string, container?
: HTMLElement): HTMLElement
# Parameters
Name | Type |
---|---|
tagName | string |
className? | string |
container? | HTMLElement |
Returns: HTMLElement
# createNS
▸ createNS(namespaceURI
: string, tagName
: string): Element
# Parameters
Name | Type |
---|---|
namespaceURI | string |
tagName | string |
Returns: Element
# disableDrag
▸ disableDrag(): void
Returns: void
# enableDrag
▸ enableDrag(): void
Returns: void
# getClass
▸ getClass(el
: HTMLElement): any
# Parameters
Name | Type |
---|---|
el | HTMLElement |
Returns: any
# hasClass
▸ hasClass(el
: HTMLElement, name
: string): boolean
# Parameters
Name | Type |
---|---|
el | HTMLElement |
name | string |
Returns: boolean
# mouseButton
▸ mouseButton(e
: MouseEvent): number
# Parameters
Name | Type |
---|---|
e | MouseEvent |
Returns: number
# mousePos
▸ mousePos(el
: HTMLElement, e
: MouseEvent | WheelEvent): GeoPoint
# Parameters
Name | Type |
---|---|
el | HTMLElement |
e | MouseEvent | WheelEvent |
Returns: GeoPoint
# remove
▸ remove(node
: HTMLElement): void
# Parameters
Name | Type |
---|---|
node | HTMLElement |
Returns: void
# removeClass
▸ removeClass(el
: HTMLElement, name
: string): void
# Parameters
Name | Type |
---|---|
el | HTMLElement |
name | string |
Returns: void
# removeEventListener
▸ removeEventListener(target
: any, type
: any, callback
: any, options?
: { capture?
: boolean ; passive?
: boolean }): void
# Parameters
Name | Type | Default value |
---|---|---|
target | any | - |
type | any | - |
callback | any | - |
options | object | {} |
options.capture? | boolean | - |
options.passive? | boolean | - |
Returns: void
# setClass
▸ setClass(el
: HTMLElement, name
: string): void
# Parameters
Name | Type |
---|---|
el | HTMLElement |
name | string |
Returns: void
# setTransform
▸ setTransform(el
: HTMLElement, value
: string): void
# Parameters
Name | Type |
---|---|
el | HTMLElement |
value | string |
Returns: void
# suppressClick
▸ suppressClick(): void
Returns: void
# touchPos
▸ touchPos(el
: HTMLElement, touches
: TouchList): GeoPoint[]
# Parameters
Name | Type |
---|---|
el | HTMLElement |
touches | TouchList |
Returns: GeoPoint[]