Class

MouseEvent

MouseEvent(viewer, options)

Constructor

# new MouseEvent(viewer, options)

鼠标事件类

Parameters:
Name Type Attributes Description
viewer Viewer

场景对象

options Object
enableEventPropagation boolean <optional>

是否启用事件传播

enableMouseOver boolean <optional>

是否启用鼠标悬停

Author:
  • xyj

Extends

Methods

# _getMousePosition(windowPosition) → {Object}

Parameters:
Name Type Description
windowPosition *

鼠标位置相关信息(包含世界坐标与WGS84等)

Object

# fire(type, params)

执行事件

Parameters:
Name Type Description
type string

事件类型

params Object

事件携带参数

Overrides:

# getEvent(type)

获取事件

Parameters:
Name Type Description
type string

事件类型

Overrides:

# off(type, fn, context) → {object}

事件取消订阅

Parameters:
Name Type Description
type string

事件类型

fn function

事件回调

context Context

生效范围

Overrides:
  • 当前事件
object

# on(type, fn, context) → {Object}

事件监听

Parameters:
Name Type Description
type *
fn *
context *
Overrides:
  • 事件对象
Object

# once(type, fn, context)

订阅一次事件

Parameters:
Name Type Description
type string

事件类型

fn function

事件回调

context Context

生效范围

Overrides: