@leafer-ui/app 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/package.json +7 -7
  2. package/src/App.ts +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/app",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "@leafer-ui/app",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,13 +22,13 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.0",
26
- "@leafer-ui/display": "1.0.0",
27
- "@leafer-ui/type": "1.0.0",
28
- "@leafer-ui/data": "1.0.0"
25
+ "@leafer/core": "1.0.1",
26
+ "@leafer-ui/display": "1.0.1",
27
+ "@leafer-ui/type": "1.0.1",
28
+ "@leafer-ui/data": "1.0.1"
29
29
  },
30
30
  "devDependencies": {
31
- "@leafer/interface": "1.0.0",
32
- "@leafer-ui/interface": "1.0.0"
31
+ "@leafer/interface": "1.0.1",
32
+ "@leafer-ui/interface": "1.0.1"
33
33
  }
34
34
  }
package/src/App.ts CHANGED
@@ -121,11 +121,13 @@ export class App extends Leafer implements IApp {
121
121
  }
122
122
 
123
123
  override __render(canvas: ILeaferCanvas, options: IRenderOptions): void {
124
- if (options.matrix) {
125
- const { a, b, c, d, e, f } = options.matrix
126
- canvas.setTransform(a, b, c, d, e, f) // screenshot
124
+ if (canvas.context) {
125
+ if (options.matrix) {
126
+ const { a, b, c, d, e, f } = options.matrix
127
+ canvas.setTransform(a, b, c, d, e, f) // screenshot
128
+ }
129
+ this.children.forEach(leafer => canvas.copyWorld(leafer.canvas))
127
130
  }
128
- this.children.forEach(leafer => canvas.copyWorld(leafer.canvas))
129
131
  }
130
132
 
131
133
  public __onResize(event: IResizeEvent): void {