@leafer/display 2.0.1 → 2.0.2

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": "2.0.1",
3
+ "version": "2.0.2",
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": "2.0.1",
26
- "@leafer/data": "2.0.1",
27
- "@leafer/layout": "2.0.1",
28
- "@leafer/display-module": "2.0.1",
29
- "@leafer/event": "2.0.1",
30
- "@leafer/decorator": "2.0.1",
31
- "@leafer/helper": "2.0.1",
32
- "@leafer/image": "2.0.1",
33
- "@leafer/debug": "2.0.1",
34
- "@leafer/platform": "2.0.1"
25
+ "@leafer/math": "2.0.2",
26
+ "@leafer/data": "2.0.2",
27
+ "@leafer/layout": "2.0.2",
28
+ "@leafer/display-module": "2.0.2",
29
+ "@leafer/event": "2.0.2",
30
+ "@leafer/decorator": "2.0.2",
31
+ "@leafer/helper": "2.0.2",
32
+ "@leafer/image": "2.0.2",
33
+ "@leafer/debug": "2.0.2",
34
+ "@leafer/platform": "2.0.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@leafer/interface": "2.0.1"
37
+ "@leafer/interface": "2.0.2"
38
38
  }
39
39
  }
package/src/Branch.ts CHANGED
@@ -72,6 +72,7 @@ export class Branch extends Leaf { // tip: rewrited Group
72
72
  if (!child.__) {
73
73
  if (isArray(child)) return child.forEach(item => { this.add(item, index); noIndex || index++ }) // add []
74
74
  else child = UICreator.get(child.tag, child) // add JSON
75
+ if (!child) return
75
76
  }
76
77
 
77
78
  if (child.parent) child.parent.remove(child)
package/src/Leaf.ts CHANGED
@@ -46,6 +46,7 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
46
46
  public get isBranch(): boolean { return false }
47
47
  public get isBranchLeaf(): boolean { return false }
48
48
 
49
+ public skipJSON?: boolean // 跳过 JSON 导出
49
50
  public syncEventer?: ILeaf // 同步触发一样事件的元素
50
51
  public lockNormalStyle?: boolean
51
52
 
@@ -588,6 +589,8 @@ export class Leaf<TInputData = ILeafInputData> implements ILeaf {
588
589
 
589
590
  public __render(_canvas: ILeaferCanvas, _options: IRenderOptions): void { }
590
591
 
592
+ public __renderComplex(_canvas: ILeaferCanvas, _options: IRenderOptions): void { }
593
+
591
594
  public __drawFast(_canvas: ILeaferCanvas, _options: IRenderOptions): void { }
592
595
 
593
596
  public __draw(_canvas: ILeaferCanvas, _options: IRenderOptions, _originCanvas?: ILeaferCanvas): void { }
package/types/index.d.ts CHANGED
@@ -17,6 +17,7 @@ declare class Leaf<TInputData = ILeafInputData> implements ILeaf {
17
17
  get isLeafer(): boolean;
18
18
  get isBranch(): boolean;
19
19
  get isBranchLeaf(): boolean;
20
+ skipJSON?: boolean;
20
21
  syncEventer?: ILeaf;
21
22
  lockNormalStyle?: boolean;
22
23
  __: ILeafData;
@@ -160,6 +161,7 @@ declare class Leaf<TInputData = ILeafInputData> implements ILeaf {
160
161
  __drawHitPath(_canvas: ILeaferCanvas): void;
161
162
  __updateHitCanvas(): void;
162
163
  __render(_canvas: ILeaferCanvas, _options: IRenderOptions): void;
164
+ __renderComplex(_canvas: ILeaferCanvas, _options: IRenderOptions): void;
163
165
  __drawFast(_canvas: ILeaferCanvas, _options: IRenderOptions): void;
164
166
  __draw(_canvas: ILeaferCanvas, _options: IRenderOptions, _originCanvas?: ILeaferCanvas): void;
165
167
  __clip(_canvas: ILeaferCanvas, _options: IRenderOptions): void;