@leafer/data 1.0.0-rc.28 → 1.0.0-rc.30

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/data",
3
- "version": "1.0.0-rc.28",
3
+ "version": "1.0.0-rc.30",
4
4
  "description": "@leafer/data",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "devDependencies": {
25
- "@leafer/interface": "1.0.0-rc.28"
25
+ "@leafer/interface": "1.0.0-rc.30"
26
26
  }
27
27
  }
package/src/LeafData.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ILeafData, ILeaf, IObject, IValue, IPathCommandData } from '@leafer/interface'
1
+ import { ILeafData, ILeaf, IObject, IValue, IPathCommandData, IJSONOptions } from '@leafer/interface'
2
2
 
3
3
 
4
4
  export class LeafData implements ILeafData {
@@ -69,7 +69,7 @@ export class LeafData implements ILeafData {
69
69
  if (this.__input && this.__input[name] !== undefined) this.__input[name] = undefined
70
70
  }
71
71
 
72
- public __getInputData(names?: string[] | IObject): IObject {
72
+ public __getInputData(names?: string[] | IObject, options?: IJSONOptions): IObject {
73
73
  const data: IObject = {}
74
74
 
75
75
  if (names) {
@@ -99,6 +99,13 @@ export class LeafData implements ILeafData {
99
99
 
100
100
  }
101
101
 
102
+ if (options) {
103
+ if (options.matrix) {
104
+ const { a, b, c, d, e, f } = this.__leaf.__localMatrix
105
+ data.matrix = { a, b, c, d, e, f }
106
+ }
107
+ }
108
+
102
109
  return data
103
110
  }
104
111
 
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IObject, IBooleanMap, ILeafData, ILeaf, IPathCommandData } from '@leafer/interface';
1
+ import { IObject, IBooleanMap, ILeafData, ILeaf, IPathCommandData, IJSONOptions } from '@leafer/interface';
2
2
 
3
3
  declare const DataHelper: {
4
4
  default<T>(t: T, defaultData: IObject): T;
@@ -26,7 +26,7 @@ declare class LeafData implements ILeafData {
26
26
  __setInput(name: string, value: any): void;
27
27
  __getInput(name: string): any;
28
28
  __removeInput(name: string): void;
29
- __getInputData(names?: string[] | IObject): IObject;
29
+ __getInputData(names?: string[] | IObject, options?: IJSONOptions): IObject;
30
30
  __setMiddle(name: string, value: any): void;
31
31
  __getMiddle(name: string): any;
32
32
  __checkSingle(): void;