@leafer/display 1.9.3 → 1.9.5

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.9.3",
3
+ "version": "1.9.5",
4
4
  "description": "@leafer/display",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,18 +22,18 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/math": "1.9.3",
26
- "@leafer/data": "1.9.3",
27
- "@leafer/layout": "1.9.3",
28
- "@leafer/display-module": "1.9.3",
29
- "@leafer/event": "1.9.3",
30
- "@leafer/decorator": "1.9.3",
31
- "@leafer/helper": "1.9.3",
32
- "@leafer/image": "1.9.3",
33
- "@leafer/debug": "1.9.3",
34
- "@leafer/platform": "1.9.3"
25
+ "@leafer/math": "1.9.5",
26
+ "@leafer/data": "1.9.5",
27
+ "@leafer/layout": "1.9.5",
28
+ "@leafer/display-module": "1.9.5",
29
+ "@leafer/event": "1.9.5",
30
+ "@leafer/decorator": "1.9.5",
31
+ "@leafer/helper": "1.9.5",
32
+ "@leafer/image": "1.9.5",
33
+ "@leafer/debug": "1.9.5",
34
+ "@leafer/platform": "1.9.5"
35
35
  },
36
36
  "devDependencies": {
37
- "@leafer/interface": "1.9.3"
37
+ "@leafer/interface": "1.9.5"
38
38
  }
39
39
  }
package/src/Leaf.ts CHANGED
@@ -22,7 +22,7 @@ const { moveLocal, zoomOfLocal, rotateOfLocal, skewOfLocal, moveWorld, zoomOfWor
22
22
  @useModule(LeafBounds)
23
23
  @useModule(LeafEventer)
24
24
  @useModule(LeafRender)
25
- export class Leaf implements ILeaf {
25
+ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
26
26
 
27
27
  public get tag(): string { return this.__tag }
28
28
  public set tag(_value: string) { }
@@ -111,7 +111,7 @@ export class Leaf implements ILeaf {
111
111
  public destroyed: boolean
112
112
 
113
113
 
114
- constructor(data?: ILeafInputData) {
114
+ constructor(data?: TInputData) {
115
115
  this.innerId = create(LEAF)
116
116
  this.reset(data)
117
117
  if (this.__bubbleMap) this.__emitLifeEvent(ChildEvent.CREATED)
@@ -415,11 +415,11 @@ export class Leaf implements ILeaf {
415
415
  relative.innerToWorld(world, to, distance)
416
416
  world = to ? to : world
417
417
  }
418
- toInnerPoint(this.worldTransform, world, to, distance)
418
+ toInnerPoint(this.scrollWorldTransform, world, to, distance)
419
419
  }
420
420
 
421
421
  public innerToWorld(inner: IPointData, to?: IPointData, distance?: boolean, relative?: ILeaf): void {
422
- toOuterPoint(this.worldTransform, inner, to, distance)
422
+ toOuterPoint(this.scrollWorldTransform, inner, to, distance)
423
423
  if (relative) relative.worldToInner(to ? to : inner, null, distance)
424
424
  }
425
425
 
package/types/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventParamsMap, IEventListenerMap, ILeafInputData, IFunction, IObject, IValue, IJSONOptions, IFindMethod, ILeaferCanvas, IRenderOptions, IScaleFixed, IScaleData, ILocationType, IBoundsType, ILayoutBoundsData, IPointData, ITransition, IAlign, IAxis, IRadiusPointData, IMotionPathData, IUnitData, IRotationPointData, IEventParams, IEventListener, IEventOption, IEventListenerId, IEvent, IValueFunction, IAttrDecorator } from '@leafer/interface';
1
+ import { ILeafInputData, ILeaf, InnerId, ILeaferBase, ILeafData, ILeafLayout, IMatrixWithBoundsScaleData, IMatrixWithBoundsData, IMatrixData, IBoundsData, IMatrixWithScaleData, IHitCanvas, IEventParamsMap, IEventListenerMap, IFunction, IObject, IValue, IJSONOptions, IFindMethod, ILeaferCanvas, IRenderOptions, IScaleFixed, IScaleData, 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
 
5
- declare class Leaf implements ILeaf {
5
+ declare class Leaf<TInputData = ILeafInputData> implements ILeaf {
6
6
  get tag(): string;
7
7
  set tag(_value: string);
8
8
  get __tag(): string;
@@ -57,7 +57,7 @@ declare class Leaf implements ILeaf {
57
57
  children?: ILeaf[];
58
58
  topChildren?: ILeaf[];
59
59
  destroyed: boolean;
60
- constructor(data?: ILeafInputData);
60
+ constructor(data?: TInputData);
61
61
  reset(data?: ILeafInputData): void;
62
62
  resetCustom(): void;
63
63
  waitParent(item: IFunction, bind?: IObject): void;