@leafer-ui/app 1.0.4 → 1.0.6

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 +10 -10
  2. package/src/App.ts +3 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/app",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "@leafer-ui/app",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -13,22 +13,22 @@
13
13
  ],
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/leaferjs/ui.git"
16
+ "url": "https://github.com/leaferjs/leafer-ui.git"
17
17
  },
18
- "homepage": "https://github.com/leaferjs/ui/tree/main/packages/app",
19
- "bugs": "https://github.com/leaferjs/ui/issues",
18
+ "homepage": "https://github.com/leaferjs/leafer-ui/tree/main/packages/app",
19
+ "bugs": "https://github.com/leaferjs/leafer-ui/issues",
20
20
  "keywords": [
21
21
  "leafer-ui",
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.4",
26
- "@leafer-ui/display": "1.0.4",
27
- "@leafer-ui/type": "1.0.4",
28
- "@leafer-ui/data": "1.0.4"
25
+ "@leafer/core": "1.0.6",
26
+ "@leafer-ui/display": "1.0.6",
27
+ "@leafer-ui/type": "1.0.6",
28
+ "@leafer-ui/data": "1.0.6"
29
29
  },
30
30
  "devDependencies": {
31
- "@leafer/interface": "1.0.4",
32
- "@leafer-ui/interface": "1.0.4"
31
+ "@leafer/interface": "1.0.6",
32
+ "@leafer-ui/interface": "1.0.6"
33
33
  }
34
34
  }
package/src/App.ts CHANGED
@@ -32,21 +32,15 @@ export class App extends Leafer implements IApp {
32
32
  if (ground) this.ground = this.addLeafer(ground)
33
33
  if (tree || editor) this.tree = this.addLeafer(tree)
34
34
  if (sky || editor) this.sky = this.addLeafer(sky || { type: 'draw', usePartRender: false })
35
- if (editor) {
36
- this.editor = Creator.editor(editor) as IEditorBase
37
- this.sky.add(this.editor)
38
- }
35
+ if (editor) this.sky.add(this.editor = Creator.editor(editor) as IEditorBase)
39
36
  }
40
37
  }
41
38
 
42
39
  protected __setApp(): void {
43
40
  const { canvas } = this
44
41
  const { realCanvas, view } = this.config
45
- if (realCanvas || view === this.canvas.view || !canvas.parentView) {
46
- this.realCanvas = true
47
- } else {
48
- canvas.unrealCanvas()
49
- }
42
+ if (realCanvas || view === this.canvas.view || !canvas.parentView) this.realCanvas = true
43
+ else canvas.unrealCanvas()
50
44
 
51
45
  this.leafer = this
52
46
  this.watcher.disable()