@leafer-ui/decorator 1.0.0-rc.21 → 1.0.0-rc.23

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 +4 -4
  2. package/src/data.ts +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leafer-ui/decorator",
3
- "version": "1.0.0-rc.21",
3
+ "version": "1.0.0-rc.23",
4
4
  "description": "@leafer-ui/decorator",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,10 +22,10 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/core": "1.0.0-rc.21"
25
+ "@leafer/core": "1.0.0-rc.23"
26
26
  },
27
27
  "devDependencies": {
28
- "@leafer/interface": "1.0.0-rc.21",
29
- "@leafer-ui/interface": "1.0.0-rc.21"
28
+ "@leafer/interface": "1.0.0-rc.23",
29
+ "@leafer-ui/interface": "1.0.0-rc.23"
30
30
  }
31
31
  }
package/src/data.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { IStateStyleType, IValue, IObject } from '@leafer/interface'
2
2
  import { defineKey, decorateLeafAttr, attr, doStrokeType } from '@leafer/core'
3
3
 
4
- import { ICanvas, IUI } from '@leafer-ui/interface'
4
+ import { ICanvas, IUI, IApp } from '@leafer-ui/interface'
5
5
  import { State } from '@leafer-ui/external'
6
6
 
7
7
 
@@ -50,7 +50,11 @@ export function zoomLayerType() {
50
50
  const privateKey = '_' + key
51
51
  defineKey(target, key, {
52
52
  set(value: IUI) { if (this.isLeafer) (this as IObject)[privateKey] = value },
53
- get() { return this.isLeafer ? ((this as IObject)[privateKey] || this) : this.leafer && this.leafer.zoomLayer }
53
+ get() {
54
+ return this.isApp
55
+ ? (this as IApp).tree.zoomLayer
56
+ : (this.isLeafer ? ((this as IObject)[privateKey] || this) : this.leafer && this.leafer.zoomLayer)
57
+ }
54
58
  })
55
59
  }
56
60
  }