Home > SCH_PrimitiveAttribute > modify
SCH_PrimitiveAttribute.modify() method
此 API 当前处于 BETA 预览状态,希望得到开发者的反馈。它的任何功能都可能在接下来的开发进程中被修改,请不要将它用于任何正式环境。
修改属性
签名
typescript
modify(primitiveId: string | ISCH_PrimitiveAttribute, property: {
x?: number | null;
y?: number | null;
rotation?: number | null;
color?: string | null;
fontName?: string | null;
fontSize?: number | null;
bold?: boolean | null;
italic?: boolean | null;
underLine?: boolean | null;
alignMode?: ESCH_PrimitiveTextAlignMode | null;
fillColor?: string | null;
key?: string;
value?: string;
keyVisible?: boolean | null;
valueVisible?: boolean | null;
}): Promise<ISCH_PrimitiveAttribute | undefined>;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
参数名
参数 | 类型 | 描述 |
|---|---|---|
primitiveId | string | ISCH_PrimitiveAttribute | 图元 ID |
property | { x?: number | null; y?: number | null; rotation?: number | null; color?: string | null; fontName?: string | null; fontSize?: number | null; bold?: boolean | null; italic?: boolean | null; underLine?: boolean | null; alignMode?: ESCH_PrimitiveTextAlignMode | null; fillColor?: string | null; key?: string; value?: string; keyVisible?: boolean | null; valueVisible?: boolean | null; } | 修改参数 |
返回值
Promise<ISCH_PrimitiveAttribute | undefined>
属性图元对象