Skip to content

Commit e0f5d5d

Browse files
committed
Modified typescript
1 parent 86bbd8c commit e0f5d5d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/canvas/handlers/Handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,10 +577,10 @@ class Handler implements HandlerOptions {
577577
/**
578578
* Set the image
579579
* @param {FabricImage} obj
580-
* @param {*} source
580+
* @param {(File | string)} [source]
581581
* @returns
582582
*/
583-
public setImage = (obj: FabricImage, source: any) => {
583+
public setImage = (obj: FabricImage, source?: File | string) => {
584584
if (!source) {
585585
this.loadImage(obj, null);
586586
obj.set('file', null);

src/components/canvas/utils/ObjectUtil.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ export interface AnimationProperty {
2222

2323
export interface LinkProperty {
2424
enabled?: boolean;
25-
type?: 'resource' | 'alarm';
26-
state?: 'new' | 'tab';
25+
type?: string;
26+
state?: string;
2727
dashboard?: any;
2828
}
2929

3030
export interface TooltipProperty {
3131
enabled?: boolean;
32-
type?: 'resource' | 'alarm';
32+
type?: string;
3333
template?: string;
3434
}
3535

3636
export interface TriggerProperty {
3737
enabled?: boolean;
38-
type?: 'resource' | 'alarm';
38+
type?: string;
3939
script?: string;
40-
effect?: 'style' | 'animation';
40+
effect?: string;
4141
}
4242

4343
export interface FabricCanvasOption {

0 commit comments

Comments
 (0)