@leafer/renderer 1.0.0-rc.17 → 1.0.0-rc.18

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/renderer",
3
- "version": "1.0.0-rc.17",
3
+ "version": "1.0.0-rc.18",
4
4
  "description": "@leafer/renderer",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,9 +22,9 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.0-rc.17"
25
+ "@leafer/core": "1.0.0-rc.18"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.0.0-rc.17"
28
+ "@leafer/interface": "1.0.0-rc.18"
29
29
  }
30
30
  }
package/src/Renderer.ts CHANGED
@@ -19,6 +19,7 @@ export class Renderer implements IRenderer {
19
19
 
20
20
  public waitAgain: boolean
21
21
  public changed: boolean
22
+ public ignore: boolean
22
23
 
23
24
  public config: IRendererConfig = {
24
25
  usePartRender: true,
@@ -109,6 +110,11 @@ export class Renderer implements IRenderer {
109
110
  } else {
110
111
  this.requestLayout()
111
112
 
113
+ if (this.ignore) {
114
+ this.ignore = this.rendering = false
115
+ return
116
+ }
117
+
112
118
  this.emitRender(RenderEvent.BEFORE)
113
119
 
114
120
  if (this.config.usePartRender && this.totalTimes > 1) {
@@ -274,9 +280,7 @@ export class Renderer implements IRenderer {
274
280
  if (this.target) {
275
281
  this.stop()
276
282
  this.__removeListenEvents()
277
- this.target = null
278
- this.canvas = null
279
- this.config = null
283
+ this.target = this.canvas = this.config = null
280
284
  }
281
285
  }
282
286
  }
package/types/index.d.ts CHANGED
@@ -12,6 +12,7 @@ declare class Renderer implements IRenderer {
12
12
  rendering: boolean;
13
13
  waitAgain: boolean;
14
14
  changed: boolean;
15
+ ignore: boolean;
15
16
  config: IRendererConfig;
16
17
  protected renderBounds: IBounds;
17
18
  protected renderOptions: IRenderOptions;