Class: IconsPanel
编辑器左侧的图片面板,功能极简单,演示用
Hierarchy
EventTarget
↳
IconsPanel
Table of contents
Constructors
Properties
Methods
Constructors
constructor
new IconsPanel(stage
)
Parameters
Name | Type |
---|---|
stage | any |
Overrides
EventTarget.constructor
Properties
dargItem
dargItem: any
domElement
domElement: HTMLElement
stage
stage: Stage
Methods
addEventListener
addEventListener(type
, callback
): void
增加事件监听
Parameters
Name | Type | Description |
---|---|---|
type | string | 事件类型 |
callback | Function |
Returns
void
Inherited from
EventTarget.addEventListener
dispatchEvent
dispatchEvent(event
): void
分发事件
Parameters
Name | Type |
---|---|
event | any |
Returns
void
Inherited from
EventTarget.dispatchEvent
getDragItem
getDragItem(): any
获取当前被拖拽的项
Returns
any
hasListener
hasListener(type
): boolean
是否有该类型的监听
Parameters
Name | Type |
---|---|
type | string |
Returns
boolean
Inherited from
EventTarget.hasListener
hide
hide(): IconsPanel
Returns
initDom
initDom(): IconsPanel
Returns
on
on(type
, callback
): void
增加监听事件, 功能完全等同于addEventListener,一种简写
Parameters
Name | Type | Description |
---|---|---|
type | string | 事件类型 |
callback | Function | 事件处理函数 |
Returns
void
Inherited from
EventTarget.on
removeEventListener
removeEventListener(type
, callback
): any
移除一个事件监听
Parameters
Name | Type |
---|---|
type | string |
callback | Function |
Returns
any
Inherited from
EventTarget.removeEventListener
setConfig
setConfig(data
): IconsPanel
Parameters
Name | Type |
---|---|
data | any |
Returns
show
show(): IconsPanel