Popup

Popup

弹窗

Constructor

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
coords Array

坐标

content String | HTMLElement

内容

offset Array <optional>

[left,top] 偏移像素

anchor ANCHORS <optional>

锚点

zooms Array <optional>

限制层级

collision boolean <optional>

碰撞检测

fadeIn boolean <optional>

渐入效果

pointerEvents String <optional>

指针事件

zindex Number <optional>

zindex

onSize function <optional>

宽高变化后回调函数

Extends

Members

content

描述:
  • text / html

text / html

coords

描述:
  • 获取坐标

获取坐标

pointerEvents

描述:
  • 鼠标事件

鼠标事件

zindex

描述:
  • zindex

zindex

Methods

addTo(target) → {this}

描述:
  • 添加到地图或弹窗组

Overrides:
Parameters:
Name Type Description
target Map | PopupGroup
Returns:
Type
this

at(left, top) → {this}

描述:
  • 固定在屏幕位置

Parameters:
Name Type Description
left Number
top Number
Returns:
Type
this

bind(target) → {this}

描述:
  • 绑定对象显隐状态

Parameters:
Name Type Description
target *
Returns:
Type
this

discard() → {this}

描述:
  • 从地图或弹窗组移除

Overrides:
Returns:
Type
this

fitView(options) → {this}

描述:
  • 适应视口

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Description
margin Array <optional>

[left,top,right,bottom] 根据锚点偏移间距

Returns:
Type
this

hide() → {this}

描述:
  • 隐藏

Returns:
Type
this

refresh() → {this}

描述:
  • 更新位置

Returns:
Type
this

resize() → {this}

描述:
  • 重新计算宽高

Returns:
Type
this

show(duration) → {this}

描述:
  • 显示

Parameters:
Name Type Description
duration *

持续时间

Returns:
Type
this

tip() → {this}

描述:
  • 强制显示一次

Returns:
Type
this

unbind(target) → {this}

描述:
  • 解除绑定对象显隐状态

Parameters:
Name Type Description
target *
Returns:
Type
this