Skip to content

Commit

Permalink
fix(type): label missing fillOpacity (#3242)
Browse files Browse the repository at this point in the history
  • Loading branch information
susiwen8 authored and Yanyan-Wang committed Jun 13, 2022
1 parent a7608d7 commit 8e97f92
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions packages/core/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,10 @@ export interface States {

export interface StateStyles {
[key: string]:
| ShapeStyle
| {
[key: string]: ShapeStyle;
};
| ShapeStyle
| {
[key: string]: ShapeStyle;
};
}

// model types (node edge group)
Expand Down Expand Up @@ -272,7 +272,7 @@ export interface GraphOptions {
size: number | number[];
color: string;
}> &
ModelStyle;
ModelStyle;

/**
* 默认状态下边的配置,比如 type, size, color。会被写入的 data 覆盖。
Expand All @@ -282,7 +282,7 @@ export interface GraphOptions {
size: number | number[];
color: string;
}> &
ModelStyle;
ModelStyle;

/**
* Combo 默认配置
Expand All @@ -292,7 +292,7 @@ export interface GraphOptions {
size: number | number[];
color: string;
}> &
ModelStyle;
ModelStyle;

nodeStateStyles?: StateStyles;

Expand Down Expand Up @@ -372,6 +372,7 @@ export type LabelStyle = Partial<{
position: string;
textBaseline: 'top' | 'middle' | 'bottom' | 'hanging' | 'alphabetic' | 'ideographic';
offset: number;
fillOpacity: number;
background?: {
fill?: string;
stroke?: string;
Expand Down Expand Up @@ -424,10 +425,10 @@ export interface TreeGraphData {
depth?: number;
collapsed?: boolean;
style?:
| ShapeStyle
| {
[key: string]: ShapeStyle;
};
| ShapeStyle
| {
[key: string]: ShapeStyle;
};
stateStyles?: StateStyles;
[key: string]: unknown;
}
Expand Down Expand Up @@ -844,5 +845,5 @@ export interface HullCfg {
export interface FitViewRules {
onlyOutOfViewPort?: boolean; // 是否仅当图形的宽度或高度超出视口时才适应视图 onlyOutOfViewPort
direction?: 'x' | 'y' | 'both'; // fitview的方向
ratioRule?: 'max' | 'min' ; // fitview的ratio大小规则
ratioRule?: 'max' | 'min'; // fitview的ratio大小规则
}

0 comments on commit 8e97f92

Please sign in to comment.