-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
请求新增“获取鼠标在画布的坐标”和“放置元件”接口 #7
Comments
|
目前想实现在 iframe 内选择一个器件,可以由用户自由放置(类似“器件/复用模块”窗口那样)的功能 (这个功能也可以用之前提到的两个需求 iframe 消息传递+获取坐标来实现 |
看起来是一个确实可能会用到的功能,准备提供两个接口(原理图+PCB) |
https://prodocs.lceda.cn/cn/api/reference/pro-api.sch_primitivecomponent.create.html 像下面这样, libraryUUID = "0819f05c4eef4c71ace90d822a990e87";
componentUUID = "9f9c6cb41c7449fd8acf96aceed2661a";
x = 100;
y = 100;
eda.sch_PrimitiveComponent.create({"libraryUuid": libraryUUID, "uuid": componentUUID}, x, y); |
在最新的2.2.34.8已经支持获取鼠标位置接口 |
🤔 文档有更新吗 |
1. 获取鼠标在画布的坐标
如题,获取鼠标在画布的坐标
2. 放置元件
目前的
create
方法需要指定一个坐标才能放置元件,请求新增一个和如下功能相同的接口:传入
componentUuid
和subLibraryId
,将对应器件符号吸附到鼠标指针,左键放置、右键取消...The text was updated successfully, but these errors were encountered: