你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
EventManager class
地图控件事件的管理器。 通过 atlas 的事件属性公开。Map 类。 用户无法实例化。
方法
方法详细信息
add("boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", (e: MapEvent) => void)
将事件添加到地图。
function add(eventType: "boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", callback: (e: MapEvent) => void)
参数
- eventType
-
"boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend"
事件名称。
- callback
-
(e: MapEvent) => void
事件处理程序回调。
add("click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", HtmlMarker | HtmlMarker[], (e: TargetedEvent) => void)
将事件添加到 HtmlMarker (s) 。
function add(eventType: "click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", target: HtmlMarker | HtmlMarker[], callback: (e: TargetedEvent) => void)
参数
- eventType
-
"click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup"
事件名称。
- target
-
HtmlMarker | HtmlMarker[]
要为其添加事件的 HtmlMarker (s) 。
- callback
-
(e: TargetedEvent) => void
事件处理程序回调。
add("data" | "sourcedata" | "styledata", (e: MapDataEvent) => void)
向地图添加数据事件。
function add(eventType: "data" | "sourcedata" | "styledata", callback: (e: MapDataEvent) => void)
参数
- eventType
-
"data" | "sourcedata" | "styledata"
数据事件名称。
- callback
-
(e: MapDataEvent) => void
事件处理程序回调。
add("dataadded" | "dataremoved", DataSource | DataSource[], (e: Shape[]) => void)
将事件添加到 DataSource (s) 。
function add(eventType: "dataadded" | "dataremoved", target: DataSource | DataSource[], callback: (e: Shape[]) => void)
参数
- eventType
-
"dataadded" | "dataremoved"
事件名称。
- target
-
DataSource | DataSource[]
要为其添加事件的 DataSource () 。
- callback
-
(e: Shape[]) => void
事件处理程序回调。
add("datasourceupdated", DataSource | DataSource[], (e: DataSource) => void)
将事件添加到 DataSource (s) 。
function add(eventType: "datasourceupdated", target: DataSource | DataSource[], callback: (e: DataSource) => void)
参数
- eventType
-
"datasourceupdated"
事件名称。
- target
-
DataSource | DataSource[]
要为其添加事件的 DataSource () 。
- callback
-
(e: DataSource) => void
事件处理程序回调。
add("drag" | "dragend" | "dragstart" | "open" | "close", Popup | Popup[], (e: TargetedEvent) => void)
将事件添加到 Popup (s) 。
function add(eventType: "drag" | "dragend" | "dragstart" | "open" | "close", target: Popup | Popup[], callback: (e: TargetedEvent) => void)
参数
- eventType
-
"drag" | "dragend" | "dragstart" | "open" | "close"
事件名称。
- callback
-
(e: TargetedEvent) => void
事件处理程序回调。
add("error", (e: MapErrorEvent) => void)
将事件添加到地图。
function add(eventType: "error", callback: (e: MapErrorEvent) => void)
参数
- eventType
-
"error"
错误事件名称。
- callback
-
(e: MapErrorEvent) => void
事件处理程序回调。
add("layeradded" | "layerremoved", (e: Layer) => void)
将事件添加到地图。
function add(eventType: "layeradded" | "layerremoved", callback: (e: Layer) => void)
参数
- eventType
-
"layeradded" | "layerremoved"
事件名称。
- callback
-
(e: Layer) => void
事件处理程序回调。
add("layeradded" | "layerremoved", Layer | Layer[], (e: Layer) => void)
将事件添加到层 (s) 。
function add(eventType: "layeradded" | "layerremoved", target: Layer | Layer[], callback: (e: Layer) => void)
参数
- eventType
-
"layeradded" | "layerremoved"
事件名称。
- callback
-
(e: Layer) => void
事件处理程序回调。
add("mapconfigurationchanged", (e: MapConfiguration) => void)
向映射添加 mapConfiguration 更改事件。
function add(eventType: "mapconfigurationchanged", callback: (e: MapConfiguration) => void)
参数
- eventType
-
"mapconfigurationchanged"
mapConfiguration 已更改事件名称
- callback
-
(e: MapConfiguration) => void
事件处理程序回调
add("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", (e: MapMouseEvent) => void)
向地图添加鼠标事件。
function add(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", callback: (e: MapMouseEvent) => void)
参数
- eventType
-
"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu"
鼠标事件名称。
- callback
-
(e: MapMouseEvent) => void
事件处理程序回调。
add("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", Layer | Layer[], (e: MapMouseEvent) => void)
将鼠标事件添加到层 () 。
function add(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", target: Layer | Layer[], callback: (e: MapMouseEvent) => void)
参数
- eventType
-
"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu"
事件名称。
- callback
-
(e: MapMouseEvent) => void
事件处理程序回调。
add("shapechanged", Shape | Shape[], (e: Shape) => void)
将事件添加到 Shape (s) 。
function add(eventType: "shapechanged", target: Shape | Shape[], callback: (e: Shape) => void)
参数
- eventType
-
"shapechanged"
事件名称。
- callback
-
(e: Shape) => void
事件处理程序回调。
add("sourceadded" | "sourceremoved", (e: Source) => void)
将事件添加到地图。
function add(eventType: "sourceadded" | "sourceremoved", callback: (e: Source) => void)
参数
- eventType
-
"sourceadded" | "sourceremoved"
事件名称。
- callback
-
(e: Source) => void
事件处理程序回调。
add("sourceadded" | "sourceremoved", Source | Source[], (e: Source) => void)
将事件添加到源 () 。
function add(eventType: "sourceadded" | "sourceremoved", target: Source | Source[], callback: (e: Source) => void)
参数
- eventType
-
"sourceadded" | "sourceremoved"
事件名称。
- callback
-
(e: Source) => void
事件处理程序回调。
add("stylechanged", (e: StyleChangedEvent) => void)
向地图添加滚轮事件。
function add(eventType: "stylechanged", callback: (e: StyleChangedEvent) => void)
参数
- eventType
-
"stylechanged"
wheel 事件名称。
- callback
-
(e: StyleChangedEvent) => void
事件处理程序回调。
add("styleimagemissing", (e: string) => void)
向地图添加缺少样式图像的事件。
function add(eventType: "styleimagemissing", callback: (e: string) => void)
参数
- eventType
-
"styleimagemissing"
样式图像缺少事件名称。
- callback
-
(e: string) => void
事件处理程序回调。
add("styleselected", StyleControl, (e: string) => void)
将事件添加到 StyleControl
function add(eventType: "styleselected", target: StyleControl, callback: (e: string) => void)
参数
- eventType
-
"styleselected"
事件名称。
- target
- StyleControl
要为其添加事件的 StyleControl。
- callback
-
(e: string) => void
事件处理程序回调。
add("touchstart" | "touchend" | "touchmove" | "touchcancel", (e: MapTouchEvent) => void)
向地图添加触摸事件。
function add(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", callback: (e: MapTouchEvent) => void)
参数
- eventType
-
"touchstart" | "touchend" | "touchmove" | "touchcancel"
触摸事件名称。
- callback
-
(e: MapTouchEvent) => void
事件处理程序回调。
add("touchstart" | "touchend" | "touchmove" | "touchcancel", Layer | Layer[], (e: MapTouchEvent) => void)
将触摸事件添加到 Layer (s) 。
function add(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", target: Layer | Layer[], callback: (e: MapTouchEvent) => void)
参数
- eventType
-
"touchstart" | "touchend" | "touchmove" | "touchcancel"
事件名称。
- callback
-
(e: MapTouchEvent) => void
事件处理程序回调。
add("wheel", (e: MapMouseWheelEvent) => void)
向地图添加滚轮事件。
function add(eventType: "wheel", callback: (e: MapMouseWheelEvent) => void)
参数
- eventType
-
"wheel"
wheel 事件名称。
- callback
-
(e: MapMouseWheelEvent) => void
事件处理程序回调。
add("wheel", Layer | Layer[], (e: MapMouseWheelEvent) => void)
将 wheel 事件添加到层 (s) 。
function add(eventType: "wheel", target: Layer | Layer[], callback: (e: MapMouseWheelEvent) => void)
参数
- eventType
-
"wheel"
事件名称。
- callback
-
(e: MapMouseWheelEvent) => void
事件处理程序回调。
addOnce("boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", (e: MapEvent) => void)
将事件添加到地图。
function addOnce(eventType: "boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend", callback: (e: MapEvent) => void)
参数
- eventType
-
"boxzoomstart" | "boxzoomend" | "dragstart" | "drag" | "dragend" | "idle" | "load" | "movestart" | "move" | "moveend" | "pitchstart" | "pitch" | "pitchend" | "ready" | "render" | "resize" | "rotatestart" | "rotate" | "rotateend" | "tokenacquired" | "zoomstart" | "zoom" | "zoomend"
事件名称。
- callback
-
(e: MapEvent) => void
事件处理程序回调。
addOnce("click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", HtmlMarker, (e: TargetedEvent) => void)
将事件添加到 HtmlMarker。
function addOnce(eventType: "click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup", target: HtmlMarker, callback: (e: TargetedEvent) => void)
参数
- eventType
-
"click" | "contextmenu" | "dblclick" | "drag" | "dragstart" | "dragend" | "keydown" | "keypress" | "keyup" | "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup"
事件名称。
- target
- HtmlMarker
要为其添加事件的 HtmlMarker。
- callback
-
(e: TargetedEvent) => void
事件处理程序回调。
addOnce("data" | "sourcedata" | "styledata", (e: MapDataEvent) => void)
向地图添加数据事件。
function addOnce(eventType: "data" | "sourcedata" | "styledata", callback: (e: MapDataEvent) => void)
参数
- eventType
-
"data" | "sourcedata" | "styledata"
数据事件名称。
- callback
-
(e: MapDataEvent) => void
事件处理程序回调。
addOnce("dataadded" | "dataremoved", DataSource, (e: Shape[]) => void)
将事件添加到 DataSource。
function addOnce(eventType: "dataadded" | "dataremoved", target: DataSource, callback: (e: Shape[]) => void)
参数
- eventType
-
"dataadded" | "dataremoved"
事件名称。
- target
- DataSource
要为其添加事件的 DataSource。
- callback
-
(e: Shape[]) => void
事件处理程序回调。
addOnce("datasourceupdated", DataSource, (e: DataSource) => void)
将事件添加到 DataSource。
function addOnce(eventType: "datasourceupdated", target: DataSource, callback: (e: DataSource) => void)
参数
- eventType
-
"datasourceupdated"
事件名称。
- target
- DataSource
要为其添加事件的 DataSource。
- callback
-
(e: DataSource) => void
事件处理程序回调。
addOnce("drag" | "dragend" | "dragstart" | "open" | "close", Popup, (e: TargetedEvent) => void)
将事件添加到 Popup。
function addOnce(eventType: "drag" | "dragend" | "dragstart" | "open" | "close", target: Popup, callback: (e: TargetedEvent) => void)
参数
- eventType
-
"drag" | "dragend" | "dragstart" | "open" | "close"
事件名称。
- target
- Popup
要为其添加事件的 Popup。
- callback
-
(e: TargetedEvent) => void
事件处理程序回调。
addOnce("error", (e: MapErrorEvent) => void)
将事件添加到地图。
function addOnce(eventType: "error", callback: (e: MapErrorEvent) => void)
参数
- eventType
-
"error"
错误事件名称。
- callback
-
(e: MapErrorEvent) => void
事件处理程序回调。
addOnce("layeradded" | "layerremoved", (e: Layer) => void)
将事件添加到地图。
function addOnce(eventType: "layeradded" | "layerremoved", callback: (e: Layer) => void)
参数
- eventType
-
"layeradded" | "layerremoved"
事件名称。
- callback
-
(e: Layer) => void
事件处理程序回调。
addOnce("layeradded" | "layerremoved", Layer, (e: Layer) => void)
将触摸事件添加到层。
function addOnce(eventType: "layeradded" | "layerremoved", target: Layer, callback: (e: Layer) => void)
参数
- eventType
-
"layeradded" | "layerremoved"
触摸事件名称。
- target
- Layer
要为其添加事件的层。
- callback
-
(e: Layer) => void
事件处理程序回调。
addOnce("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", (e: MapMouseEvent) => void)
向地图添加鼠标事件。
function addOnce(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu", callback: (e: MapMouseEvent) => void)
参数
- eventType
-
"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "contextmenu"
鼠标事件名称。
- callback
-
(e: MapMouseEvent) => void
事件处理程序回调。
addOnce("mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", Layer, (e: MapMouseEvent) => void)
将鼠标事件添加到层。
function addOnce(eventType: "mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu", target: Layer, callback: (e: MapMouseEvent) => void)
参数
- eventType
-
"mousedown" | "mouseup" | "mouseover" | "mousemove" | "click" | "dblclick" | "mouseout" | "mouseenter" | "mouseleave" | "contextmenu"
鼠标事件名称。
- target
- Layer
要为其添加事件的层。
- callback
-
(e: MapMouseEvent) => void
事件处理程序回调。
addOnce("shapechanged", Shape, (e: Shape) => void)
将事件添加到 Shape。
function addOnce(eventType: "shapechanged", target: Shape, callback: (e: Shape) => void)
参数
- eventType
-
"shapechanged"
事件名称。
- target
- Shape
要为其添加事件的 Shape。
- callback
-
(e: Shape) => void
事件处理程序回调。
addOnce("sourceadded" | "sourceremoved", (e: Source) => void)
将事件添加到地图。
function addOnce(eventType: "sourceadded" | "sourceremoved", callback: (e: Source) => void)
参数
- eventType
-
"sourceadded" | "sourceremoved"
事件名称。
- callback
-
(e: Source) => void
事件处理程序回调。
addOnce("sourceadded" | "sourceremoved", Source, (e: Source) => void)
将事件添加到源。
function addOnce(eventType: "sourceadded" | "sourceremoved", target: Source, callback: (e: Source) => void)
参数
- eventType
-
"sourceadded" | "sourceremoved"
事件名称。
- target
- Source
要为其添加事件的源。
- callback
-
(e: Source) => void
事件处理程序回调。
addOnce("stylechanged", (e: StyleChangedEvent) => void)
向地图添加滚轮事件。
function addOnce(eventType: "stylechanged", callback: (e: StyleChangedEvent) => void)
参数
- eventType
-
"stylechanged"
wheel 事件名称。
- callback
-
(e: StyleChangedEvent) => void
事件处理程序回调。
addOnce("styleimagemissing", (e: string) => void)
向地图添加缺少样式图像的事件。
function addOnce(eventType: "styleimagemissing", callback: (e: string) => void)
参数
- eventType
-
"styleimagemissing"
样式图像缺少事件名称。
- callback
-
(e: string) => void
事件处理程序回调。
addOnce("styleselected", StyleControl, (e: string) => void)
将事件添加到 StyleControl
function addOnce(eventType: "styleselected", target: StyleControl, callback: (e: string) => void)
参数
- eventType
-
"styleselected"
事件名称。
- target
- StyleControl
要为其添加事件的 StyleControl。
- callback
-
(e: string) => void
事件处理程序回调。
addOnce("touchstart" | "touchend" | "touchmove" | "touchcancel", (e: MapTouchEvent) => void)
向地图添加触摸事件。
function addOnce(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", callback: (e: MapTouchEvent) => void)
参数
- eventType
-
"touchstart" | "touchend" | "touchmove" | "touchcancel"
触摸事件名称。
- callback
-
(e: MapTouchEvent) => void
事件处理程序回调。
addOnce("touchstart" | "touchend" | "touchmove" | "touchcancel", Layer, (e: MapTouchEvent) => void)
将触摸事件添加到层。
function addOnce(eventType: "touchstart" | "touchend" | "touchmove" | "touchcancel", target: Layer, callback: (e: MapTouchEvent) => void)
参数
- eventType
-
"touchstart" | "touchend" | "touchmove" | "touchcancel"
触摸事件名称。
- target
- Layer
要为其添加事件的层。
- callback
-
(e: MapTouchEvent) => void
事件处理程序回调。
addOnce("wheel", (e: MapMouseWheelEvent) => void)
向地图添加滚轮事件。
function addOnce(eventType: "wheel", callback: (e: MapMouseWheelEvent) => void)
参数
- eventType
-
"wheel"
wheel 事件名称。
- callback
-
(e: MapMouseWheelEvent) => void
事件处理程序回调。
addOnce("wheel", Layer, (e: MapMouseWheelEvent) => void)
向层添加滚轮事件。
function addOnce(eventType: "wheel", target: Layer, callback: (e: MapMouseWheelEvent) => void)
参数
- eventType
-
"wheel"
wheel 事件名称。
- target
- Layer
要为其添加事件的层。
- callback
-
(e: MapMouseWheelEvent) => void
事件处理程序回调。
invoke(string, any)
在地图上调用事件。 这会导致映射上具有指定事件名称的所有事件处理程序被调用。
function invoke(eventType: string, args: any): any
参数
- eventType
-
string
要调用的事件的名称。
- args
-
any
要传递给回调的数据。
返回
any
invoke(string, any, any)
调用目标的事件。 这将导致调用具有指定事件名称的目标上的所有事件处理程序。
function invoke(eventType: string, target: any, args: any): any
参数
- eventType
-
string
要调用的事件的名称。
- target
-
any
要调用事件的目标。 支持的目标类型包括 Layer、HtmlMarker 和 Popup。
- args
-
any
要传递给回调的数据。 数据可以是但不能null
undefined
。
返回
any
remove(string, (e: void | Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Source | string | MapConfiguration) => void)
从映射中删除事件侦听器。
function remove(eventType: string, callback: (e: void | Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Source | string | MapConfiguration) => void)
参数
- eventType
-
string
事件名称。
- callback
-
(e: void | Layer | MapEvent | MapDataEvent | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Source | string | MapConfiguration) => void
事件处理程序回调。
remove(string, DataSource | DataSource[], (e: DataSource | Shape[]) => void)
从 DataSource () 中删除事件侦听器。
function remove(eventType: string, target: DataSource | DataSource[], callback: (e: DataSource | Shape[]) => void)
参数
- eventType
-
string
事件名称。
- target
-
DataSource | DataSource[]
要删除事件的 DataSource () 。
- callback
-
(e: DataSource | Shape[]) => void
事件处理程序回调。
remove(string, HtmlMarker | HtmlMarker[], (e: TargetedEvent) => void)
从 HtmlMarker () 中删除事件侦听器。
function remove(eventType: string, target: HtmlMarker | HtmlMarker[], callback: (e: TargetedEvent) => void)
参数
- eventType
-
string
事件名称。
- target
-
HtmlMarker | HtmlMarker[]
要删除事件的 HtmlMarker (s) 。
- callback
-
(e: TargetedEvent) => void
事件处理程序回调。
remove(string, Layer | Layer[], (e: void | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Layer) => void)
从层 () 中删除事件侦听器。
function remove(eventType: string, target: Layer | Layer[], callback: (e: void | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Layer) => void)
参数
- eventType
-
string
事件名称。
- callback
-
(e: void | MapMouseEvent | MapTouchEvent | MapMouseWheelEvent | Layer) => void
事件处理程序回调。
remove(string, Popup | Popup[], (e: TargetedEvent) => void)
从 Popup () 中删除事件侦听器。
function remove(eventType: string, target: Popup | Popup[], callback: (e: TargetedEvent) => void)
参数
- eventType
-
string
事件名称。
- callback
-
(e: TargetedEvent) => void
事件处理程序回调。
remove(string, Shape | Shape[], (e: Shape) => void)
从 Shape (s) 中删除事件侦听器。
function remove(eventType: string, target: Shape | Shape[], callback: (e: Shape) => void)
参数
- eventType
-
string
事件名称。
- callback
-
(e: Shape) => void
事件处理程序回调。
remove(string, Source | Source[], (e: Source) => void)
从源 () 中删除事件侦听器。
function remove(eventType: string, target: Source | Source[], callback: (e: Source) => void)
参数
- eventType
-
string
事件名称。
- callback
-
(e: Source) => void
事件处理程序回调。
remove(string, StyleControl, (e: string) => void)
删除 StyleControl 的事件
function remove(eventType: string, target: StyleControl, callback: (e: string) => void)
参数
- eventType
-
string
事件名称。
- target
- StyleControl
要为其添加事件的 StyleControl。
- callback
-
(e: string) => void
事件处理程序回调。