@leafer/interface 1.3.2 → 1.3.3

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/interface",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "@leafer/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -549,6 +549,8 @@ export interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix,
549
549
  forceUpdate(attrName?: string): void
550
550
  forceRender(bounds?: IBoundsData, sync?: boolean): void
551
551
 
552
+ __extraUpdate(): void // 额外更新
553
+
552
554
  // ILeafMatrix ->
553
555
  __updateWorldMatrix(): void
554
556
  __updateLocalMatrix(): void
@@ -3,12 +3,14 @@ import { ICanvasContext2DSettings } from '../canvas/ICanvas'
3
3
  import { ILeaf } from '../display/ILeaf'
4
4
  import { ILocationType } from '../layout/ILeafLayout'
5
5
  import { IBoundsData, IPointData, ISizeData } from '../math/IMath'
6
+ import { IFourNumber } from '../data/IData'
6
7
 
7
8
  export interface IExportOptions {
8
9
  quality?: number
9
10
  blob?: boolean
10
11
  scale?: number | IPointData
11
12
  size?: number | ISizeData
13
+ padding?: IFourNumber
12
14
  smooth?: boolean
13
15
  pixelRatio?: number
14
16
  slice?: boolean
@@ -1,2 +1,2 @@
1
- export type IExportImageType = 'jpg' | 'png' | 'webp'
1
+ export type IExportImageType = 'jpg' | 'png' | 'webp' | 'bmp'
2
2
  export type IExportFileType = IExportImageType | 'svg' | 'pdf' | 'json'
package/types/index.d.ts CHANGED
@@ -843,7 +843,7 @@ interface ICanvasManager {
843
843
  destroy(): void;
844
844
  }
845
845
 
846
- type IExportImageType = 'jpg' | 'png' | 'webp';
846
+ type IExportImageType = 'jpg' | 'png' | 'webp' | 'bmp';
847
847
  type IExportFileType = IExportImageType | 'svg' | 'pdf' | 'json';
848
848
 
849
849
  type ILocationType = 'world' | 'page' | 'local' | 'inner';
@@ -923,6 +923,7 @@ interface IExportOptions {
923
923
  blob?: boolean;
924
924
  scale?: number | IPointData;
925
925
  size?: number | ISizeData;
926
+ padding?: IFourNumber;
926
927
  smooth?: boolean;
927
928
  pixelRatio?: number;
928
929
  slice?: boolean;
@@ -1592,6 +1593,7 @@ interface ILeaf extends ILeafRender, ILeafHit, ILeafBounds, ILeafMatrix, ILeafDa
1592
1593
  updateLayout(): void;
1593
1594
  forceUpdate(attrName?: string): void;
1594
1595
  forceRender(bounds?: IBoundsData, sync?: boolean): void;
1596
+ __extraUpdate(): void;
1595
1597
  __updateWorldMatrix(): void;
1596
1598
  __updateLocalMatrix(): void;
1597
1599
  __updateWorldBounds(): void;