@leafer/display 1.6.2 → 1.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer/display",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "description": "@leafer/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,17 +22,17 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.6.2",
26
- "@leafer/data": "1.6.2",
27
- "@leafer/layout": "1.6.2",
28
- "@leafer/display-module": "1.6.2",
29
- "@leafer/event": "1.6.2",
30
- "@leafer/decorator": "1.6.2",
31
- "@leafer/helper": "1.6.2",
32
- "@leafer/debug": "1.6.2",
33
- "@leafer/platform": "1.6.2"
25
+ "@leafer/math": "1.6.3",
26
+ "@leafer/data": "1.6.3",
27
+ "@leafer/layout": "1.6.3",
28
+ "@leafer/display-module": "1.6.3",
29
+ "@leafer/event": "1.6.3",
30
+ "@leafer/decorator": "1.6.3",
31
+ "@leafer/helper": "1.6.3",
32
+ "@leafer/debug": "1.6.3",
33
+ "@leafer/platform": "1.6.3"
34
34
  },
35
35
  "devDependencies": {
36
- "@leafer/interface": "1.6.2"
36
+ "@leafer/interface": "1.6.3"
37
37
  }
38
38
  }
package/src/Leaf.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ILeaferBase, ILeaf, ILeafInputData, ILeafData, ILeaferCanvas, IRenderOptions, IBoundsType, ILocationType, IMatrixWithBoundsData, ILayoutBoundsData, IValue, ILeafLayout, InnerId, IHitCanvas, IRadiusPointData, IEventListenerMap, IEventListener, IEventListenerId, IEvent, IObject, IFunction, IPointData, IBoundsData, IBranch, IFindMethod, IMatrixData, IAttrDecorator, IMatrixWithBoundsScaleData, IMatrixWithScaleData, IAlign, IJSONOptions, IEventMap, IEventOption, IAxis, IMotionPathData, IUnitData, IRotationPointData, ITransition, IValueFunction } from '@leafer/interface'
1
+ import { ILeaferBase, ILeaf, ILeafInputData, ILeafData, ILeaferCanvas, IRenderOptions, IBoundsType, ILocationType, IMatrixWithBoundsData, ILayoutBoundsData, IValue, ILeafLayout, InnerId, IHitCanvas, IRadiusPointData, IEventListenerMap, IEventListener, IEventListenerId, IEvent, IObject, IFunction, IPointData, IBoundsData, IBranch, IFindMethod, IMatrixData, IAttrDecorator, IMatrixWithBoundsScaleData, IMatrixWithScaleData, IAlign, IJSONOptions, IEventParamsMap, IEventOption, IAxis, IMotionPathData, IUnitData, IRotationPointData, ITransition, IValueFunction, IEventParams } from '@leafer/interface'
2
2
  import { BoundsHelper, IncrementId, MatrixHelper, PointHelper } from '@leafer/math'
3
3
  import { LeafData } from '@leafer/data'
4
4
  import { LeafLayout } from '@leafer/layout'
@@ -91,11 +91,14 @@ export class Leaf implements ILeaf {
91
91
  public get pathInputed(): boolean { return this.__.__pathInputed as unknown as boolean }
92
92
 
93
93
  // event
94
- public set event(map: IEventMap) { this.on(map) }
94
+ public set event(map: IEventParamsMap) { this.on(map) }
95
95
 
96
96
  public __captureMap?: IEventListenerMap
97
97
  public __bubbleMap?: IEventListenerMap
98
98
 
99
+ public __hasLocalEvent?: boolean
100
+ public __hasWorldEvent?: boolean
101
+
99
102
  // branch
100
103
  public children?: ILeaf[]
101
104
 
@@ -631,15 +634,15 @@ export class Leaf implements ILeaf {
631
634
 
632
635
  // LeafEventer rewrite
633
636
 
634
- public on(_type: string | string[] | IEventMap, _listener?: IEventListener, _options?: IEventOption): void { }
637
+ public on(_type: string | string[] | IEventParams[] | IEventParamsMap, _listener?: IEventListener, _options?: IEventOption): void { }
635
638
 
636
639
  public off(_type?: string | string[], _listener?: IEventListener, _options?: IEventOption): void { }
637
640
 
638
- public on_(_type: string | string[], _listener: IEventListener, _bind?: IObject, _options?: IEventOption): IEventListenerId { return undefined }
641
+ public on_(_type: string | string[] | IEventParams[], _listener?: IEventListener, _bind?: IObject, _options?: IEventOption): IEventListenerId { return undefined }
639
642
 
640
643
  public off_(_id: IEventListenerId | IEventListenerId[]): void { }
641
644
 
642
- public once(_type: string | string[], _listener: IEventListener, _capture?: boolean): void { }
645
+ public once(_type: string | string[] | IEventParams[], _listener?: IEventListener, _captureOrBind?: boolean | IObject, _capture?: boolean): void { }
643
646
 
644
647
  public emit(_type: string, _event?: IEvent | IObject, _capture?: boolean): void { }
645
648
 
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventMap, IEventListenerMap, ILeafInputData, IFunction, IObject, IValue, IJSONOptions, IFindMethod, ILeaferCanvas, IRenderOptions, ILocationType, IBoundsType, ILayoutBoundsData, IPointData, ITransition, IAlign, IAxis, IRadiusPointData, IMotionPathData, IUnitData, IRotationPointData, IEventListener, IEventOption, IEventListenerId, IEvent, IValueFunction, IAttrDecorator } from '@leafer/interface';
1
+ import { ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventParamsMap, IEventListenerMap, ILeafInputData, IFunction, IObject, IValue, IJSONOptions, IFindMethod, ILeaferCanvas, IRenderOptions, ILocationType, IBoundsType, ILayoutBoundsData, IPointData, ITransition, IAlign, IAxis, IRadiusPointData, IMotionPathData, IUnitData, IRotationPointData, IEventParams, IEventListener, IEventOption, IEventListenerId, IEvent, IValueFunction, IAttrDecorator } from '@leafer/interface';
2
2
  import { LeafData } from '@leafer/data';
3
3
  import { LeafLayout } from '@leafer/layout';
4
4
 
@@ -47,9 +47,11 @@ declare class Leaf implements ILeaf {
47
47
  get __ignoreHitWorld(): boolean;
48
48
  get __inLazyBounds(): boolean;
49
49
  get pathInputed(): boolean;
50
- set event(map: IEventMap);
50
+ set event(map: IEventParamsMap);
51
51
  __captureMap?: IEventListenerMap;
52
52
  __bubbleMap?: IEventListenerMap;
53
+ __hasLocalEvent?: boolean;
54
+ __hasWorldEvent?: boolean;
53
55
  children?: ILeaf[];
54
56
  destroyed: boolean;
55
57
  constructor(data?: ILeafInputData);
@@ -171,11 +173,11 @@ declare class Leaf implements ILeaf {
171
173
  add(_child: ILeaf | ILeaf[] | ILeafInputData | ILeafInputData[], _index?: number): void;
172
174
  remove(_child?: ILeaf | number | string | IFindMethod, destroy?: boolean): void;
173
175
  dropTo(parent: ILeaf, index?: number, resize?: boolean): void;
174
- on(_type: string | string[] | IEventMap, _listener?: IEventListener, _options?: IEventOption): void;
176
+ on(_type: string | string[] | IEventParams[] | IEventParamsMap, _listener?: IEventListener, _options?: IEventOption): void;
175
177
  off(_type?: string | string[], _listener?: IEventListener, _options?: IEventOption): void;
176
- on_(_type: string | string[], _listener: IEventListener, _bind?: IObject, _options?: IEventOption): IEventListenerId;
178
+ on_(_type: string | string[] | IEventParams[], _listener?: IEventListener, _bind?: IObject, _options?: IEventOption): IEventListenerId;
177
179
  off_(_id: IEventListenerId | IEventListenerId[]): void;
178
- once(_type: string | string[], _listener: IEventListener, _capture?: boolean): void;
180
+ once(_type: string | string[] | IEventParams[], _listener?: IEventListener, _captureOrBind?: boolean | IObject, _capture?: boolean): void;
179
181
  emit(_type: string, _event?: IEvent | IObject, _capture?: boolean): void;
180
182
  emitEvent(_event?: IEvent, _capture?: boolean): void;
181
183
  hasEvent(_type: string, _capture?: boolean): boolean;