Home > PCB_PrimitiveComponent > placeFootprintWithMouse
PCB_PrimitiveComponent.placeFootprintWithMouse() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
使用鼠标放置封装
Signature
typescript
placeFootprintWithMouse(footprint: {
libraryUuid: string;
uuid: string;
} | ILIB_FootprintItem | ILIB_FootprintSearchItem, properties?: {
[key: string]: boolean | number | string | undefined;
}): Promise<boolean>;1
2
3
4
5
6
2
3
4
5
6
Parameters
Parameter | Type | Description |
|---|---|---|
footprint | { libraryUuid: string; uuid: string; } | ILIB_FootprintItem | ILIB_FootprintSearchItem | 关联库封装 |
properties | { [key: string]: boolean | number | string | undefined; } | (Optional) 器件属性 |
Returns
Promise<boolean>
是否找到封装
Remarks
ADD since API v0.2.26
本接口模拟前端点击放置按钮,指定的封装将绑定到当前鼠标,并在用户后续点击时放置于画布
本接口的返回时机并不会等待用户的放置操作,一旦封装被绑定到鼠标,本接口将立即返回 true 的结果