Class: Selector
Implements
Table of contents
Constructors
Properties
Methods
- getBy
- getByPoint
- getByInnerId
- getById
- getByClassName
- getByTag
- getByMethod
- eachFind
- toChildren
- __onRemoveChild
- __checkIdChange
- __listenEvents
- __removeListenEvents
- destroy
Constructors
constructor
• new Selector(target
, userConfig?
): Selector
Parameters
Name | Type |
---|---|
target | ILeaf |
userConfig? | ISelectorConfig |
Returns
Defined in
leafer/packages/partner/selector/src/Selector.ts:35
Properties
target
• Optional
target: ILeaf
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:11
proxy
• Optional
proxy: ISelectorProxy
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:13
config
• config: ISelectorConfig
= {}
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:15
picker
• Protected
picker: Picker
Defined in
leafer/packages/partner/selector/src/Selector.ts:17
innerIdMap
• Protected
innerIdMap: ILeafMap
= {}
Defined in
leafer/packages/partner/selector/src/Selector.ts:19
idMap
• Protected
idMap: ILeafMap
= {}
Defined in
leafer/packages/partner/selector/src/Selector.ts:20
findLeaf
• Protected
findLeaf: ILeaf
Defined in
leafer/packages/partner/selector/src/Selector.ts:22
methods
• Protected
methods: Object
Type declaration
Name | Type |
---|---|
id | (leaf : ILeaf , name : string ) => 0 | 1 |
innerId | (leaf : ILeaf , innerId : number ) => 0 | 1 |
className | (leaf : ILeaf , name : string ) => 0 | 1 |
tag | (leaf : ILeaf , name : string ) => 0 | 1 |
tags | (leaf : ILeaf , nameMap : IBooleanMap ) => 0 | 1 |
Defined in
leafer/packages/partner/selector/src/Selector.ts:24
__eventIds
• Protected
__eventIds: IEventListenerId
[]
Defined in
leafer/packages/partner/selector/src/Selector.ts:32
Methods
getBy
▸ getBy(condition
, branch?
, one?
, options?
): ILeaf
| ILeaf
[]
Parameters
Name | Type |
---|---|
condition | string | number | IFindCondition | IFindMethod |
branch? | ILeaf |
one? | boolean |
options? | any |
Returns
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:42
getByPoint
▸ getByPoint(hitPoint
, hitRadius
, options?
): IPickResult
Parameters
Name | Type |
---|---|
hitPoint | IPointData |
hitRadius | number |
options? | IPickOptions |
Returns
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:71
getByInnerId
▸ getByInnerId(innerId
, branch?
): ILeaf
Parameters
Name | Type |
---|---|
innerId | number |
branch? | ILeaf |
Returns
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:76
getById
▸ getById(id
, branch?
): ILeaf
Parameters
Name | Type |
---|---|
id | string |
branch? | ILeaf |
Returns
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:83
getByClassName
▸ getByClassName(className
, branch?
): ILeaf
[]
Parameters
Name | Type |
---|---|
className | string |
branch? | ILeaf |
Returns
ILeaf
[]
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:90
getByTag
▸ getByTag(tag
, branch?
): ILeaf
[]
Parameters
Name | Type |
---|---|
tag | string |
branch? | ILeaf |
Returns
ILeaf
[]
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:94
getByMethod
▸ getByMethod(method
, branch?
, one?
, options?
): ILeaf
| ILeaf
[]
Parameters
Name | Type |
---|---|
method | IFindMethod |
branch? | ILeaf |
one? | boolean |
options? | any |
Returns
Implementation of
Defined in
leafer/packages/partner/selector/src/Selector.ts:98
eachFind
▸ eachFind(children
, method
, list?
, options?
): void
Parameters
Name | Type |
---|---|
children | ILeaf [] |
method | IFindMethod |
list? | ILeaf [] |
options? | any |
Returns
void
Defined in
leafer/packages/partner/selector/src/Selector.ts:105
toChildren
▸ toChildren(branch
): ILeaf
[]
Parameters
Name | Type |
---|---|
branch | ILeaf |
Returns
ILeaf
[]
Defined in
leafer/packages/partner/selector/src/Selector.ts:122
__onRemoveChild
▸ __onRemoveChild(event
): void
Parameters
Name | Type |
---|---|
event | ChildEvent |
Returns
void
Defined in
leafer/packages/partner/selector/src/Selector.ts:128
__checkIdChange
▸ __checkIdChange(event
): void
Parameters
Name | Type |
---|---|
event | PropertyEvent |
Returns
void
Defined in
leafer/packages/partner/selector/src/Selector.ts:134
__listenEvents
▸ __listenEvents(): void
Returns
void
Defined in
leafer/packages/partner/selector/src/Selector.ts:142
__removeListenEvents
▸ __removeListenEvents(): void
Returns
void
Defined in
leafer/packages/partner/selector/src/Selector.ts:149
destroy
▸ destroy(): void
Returns
void