@leafer/data 1.9.3 → 1.9.5

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.9.3",
3
+ "version": "1.9.5",
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.9.3"
25
+ "@leafer/interface": "1.9.5"
26
26
  }
27
27
  }
package/src/LeafData.ts CHANGED
@@ -23,6 +23,10 @@ export class LeafData implements ILeafData {
23
23
  return path && path.length === 6 && path[0] === 1 // M = 1
24
24
  }
25
25
 
26
+ public get __usePathBox(): boolean {
27
+ return (this as ILeafData).__pathInputed as any as boolean
28
+ }
29
+
26
30
  public get __blendMode(): string {
27
31
  if ((this as ILeafData).eraser && (this as ILeafData).eraser !== 'path') return 'destination-out'
28
32
  const { blendMode } = (this as ILeafData)
package/src/data.ts CHANGED
@@ -14,7 +14,7 @@ export function isUndefined(value: any): boolean {
14
14
  }
15
15
 
16
16
  export function isNull(value: any): boolean {
17
- return value === undefined || value === null
17
+ return value == null // = value === undefined || value === null
18
18
  }
19
19
 
20
20
  export function isString<T extends string>(value: any): value is T {
package/types/index.d.ts CHANGED
@@ -20,6 +20,7 @@ declare class LeafData implements ILeafData {
20
20
  __useStroke?: boolean;
21
21
  get __useNaturalRatio(): boolean;
22
22
  get __isLinePath(): boolean;
23
+ get __usePathBox(): boolean;
23
24
  get __blendMode(): string;
24
25
  constructor(leaf: ILeaf);
25
26
  __get(name: string): any;