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
public placeFootprintWithMouse(footprint: { libraryUuid: string; uuid: string } | ILIB_FootprintItem | ILIB_FootprintSearchItem, properties?: Record<string, boolean | number | string | undefined>): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
footprint | { libraryUuid: string; uuid: string } | ILIB_FootprintItem | ILIB_FootprintSearchItem | 关联库封装 |
properties | Record<string, boolean | number | string | undefined> | (Optional) 器件属性 |
Returns
Promise<boolean>
是否找到封装
Remarks
本接口模拟前端点击放置按钮,指定的封装将绑定到当前鼠标,并在用户后续点击时放置于画布
本接口的返回时机并不会等待用户的放置操作,一旦封装被绑定到鼠标,本接口将立即返回 true 的结果 ADD since API v0.2.26