@leafer-ui/interface 2.0.5 → 2.0.7

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-ui/interface",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "@leafer-ui/interface",
5
5
  "author": "Chao (Leafer) Wan",
6
6
  "license": "MIT",
@@ -22,6 +22,6 @@
22
22
  "leaferjs"
23
23
  ],
24
24
  "dependencies": {
25
- "@leafer/interface": "2.0.5"
25
+ "@leafer/interface": "2.0.7"
26
26
  }
27
27
  }
package/src/IUI.ts CHANGED
@@ -67,6 +67,11 @@ export interface ILinkerPointData {
67
67
 
68
68
  export interface ILinkerPointOptions {
69
69
  snapRadius?: number
70
+ mode?:
71
+ | 'edge' // 自动吸附到元素包围盒边缘,默认模式
72
+ | 'four' // 自动吸附到元素包围盒上的4个方向
73
+ | 'auto' // 自动吸附到元素包围盒上,拖拽元素会自动更新最佳方向
74
+ | 'free' // 可以吸附到元素内部
70
75
  }
71
76
 
72
77
  export type ILinkerPointType = 'start' | 'end'
@@ -512,6 +517,7 @@ export interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICorne
512
517
  get<K extends keyof this>(name?: K[] | IUIInputData): IUIInputData
513
518
 
514
519
  createProxyData(): IUIInputData
520
+ clearProxyData(): void
515
521
 
516
522
  find(condition: number | string | IFindCondition | IFindUIMethod, options?: any): IUI[]
517
523
  findTag(tag: string | string[]): IUI[]
@@ -54,6 +54,7 @@ export interface IEditorBase extends IGroup, ISelectorProxy, ITransformTool {
54
54
 
55
55
  setDimOthers(value: boolean | number): void
56
56
  setBright(value: boolean): void
57
+ cancelDimOthers(): void
57
58
 
58
59
  update(): void
59
60
  updateEditBox(): void
package/src/type/IType.ts CHANGED
@@ -57,6 +57,7 @@ export interface IGradientPaint extends IPaintBase {
57
57
  type: IGradientType
58
58
  from?: IAlign | IUnitPointData
59
59
  to?: IAlign | IUnitPointData
60
+ rotation?: number
60
61
  stretch?: number
61
62
  stops: IColorStop[] | IColorString[]
62
63
  }
package/types/index.d.ts CHANGED
@@ -49,6 +49,7 @@ interface IGradientPaint extends IPaintBase {
49
49
  type: IGradientType;
50
50
  from?: IAlign | IUnitPointData;
51
51
  to?: IAlign | IUnitPointData;
52
+ rotation?: number;
52
53
  stretch?: number;
53
54
  stops: IColorStop[] | IColorString[];
54
55
  }
@@ -458,6 +459,7 @@ interface IEditorBase extends IGroup$1, ISelectorProxy, ITransformTool {
458
459
  removeItem(item: IUI$1): void;
459
460
  setDimOthers(value: boolean | number): void;
460
461
  setBright(value: boolean): void;
462
+ cancelDimOthers(): void;
461
463
  update(): void;
462
464
  updateEditBox(): void;
463
465
  getEditTool(name: string): IObject$1;
@@ -741,6 +743,7 @@ interface ILinkerPointData {
741
743
  }
742
744
  interface ILinkerPointOptions {
743
745
  snapRadius?: number;
746
+ mode?: 'edge' | 'four' | 'auto' | 'free';
744
747
  }
745
748
  type ILinkerPointType = 'start' | 'end';
746
749
  interface ILinkerComputedPointData {
@@ -1103,6 +1106,7 @@ interface IUI extends IUIAttrData, IFillAttrData, IStrokeAttrData, ICornerRadius
1103
1106
  get<K extends keyof this>(name: K): this[K];
1104
1107
  get<K extends keyof this>(name?: K[] | IUIInputData): IUIInputData;
1105
1108
  createProxyData(): IUIInputData;
1109
+ clearProxyData(): void;
1106
1110
  find(condition: number | string | IFindCondition | IFindUIMethod, options?: any): IUI[];
1107
1111
  findTag(tag: string | string[]): IUI[];
1108
1112
  findOne(condition: number | string | IFindCondition | IFindUIMethod, options?: any): IUI | undefined;