Appearance
@jtopo/editor / IconsPanel
Class: IconsPanel
编辑器左侧的图片面板,功能极简单,演示用
Hierarchy
EventTarget
↳
IconsPanel
Table of contents
Constructors
Properties
Methods
- addEventListener
- dispatchEvent
- getDragItem
- hasListener
- hide
- removeEventListener
- setConfig
- show
- touchStartHandle
Constructors
constructor
new IconsPanel(stage
, editor
)
Parameters
Name | Type |
---|---|
stage | any |
editor | any |
Overrides
EventTarget.constructor
Properties
dargItem
dargItem: any
editor
editor: any
itemSize
itemSize: number
= 40
panelDom
panelDom: any
stage
stage: any
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 | Event | EventBase |
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
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
Returns
touchStartHandle
touchStartHandle(item
, e
): void
Parameters
Name | Type |
---|---|
item | any |
e | any |
Returns
void