Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求新增“获取鼠标在画布的坐标”和“放置元件”接口 #7

Open
klxf opened this issue Oct 30, 2024 · 7 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@klxf
Copy link

klxf commented Oct 30, 2024

1. 获取鼠标在画布的坐标

如题,获取鼠标在画布的坐标

2. 放置元件

目前的 create 方法需要指定一个坐标才能放置元件,
请求新增一个和如下功能相同的接口:传入 componentUuidsubLibraryId,将对应器件符号吸附到鼠标指针,左键放置、右键取消...
QQ_1730278707139

@yanranxiaoxi
Copy link
Member

  1. 获取鼠标在画布的坐标接口已经设计等待开发
  2. 将待放置的器件吸附到鼠标功能希望能得到具体的使用场景反馈,即在什么场景下会用到这个

@yanranxiaoxi yanranxiaoxi self-assigned this Oct 31, 2024
@yanranxiaoxi yanranxiaoxi added the enhancement New feature or request label Oct 31, 2024
@klxf
Copy link
Author

klxf commented Oct 31, 2024

  1. 将待放置的器件吸附到鼠标功能希望能得到具体的使用场景反馈,即在什么场景下会用到这个

目前想实现在 iframe 内选择一个器件,可以由用户自由放置(类似“器件/复用模块”窗口那样)的功能

(这个功能也可以用之前提到的两个需求 iframe 消息传递+获取坐标来实现

@yanranxiaoxi
Copy link
Member

看起来是一个确实可能会用到的功能,准备提供两个接口(原理图+PCB)

@Sheepfan0828
Copy link

1. 获取鼠标在画布的坐标

如题,获取鼠标在画布的坐标

2. 放置元件

目前的 create 方法需要指定一个坐标才能放置元件, 请求新增一个和如下功能相同的接口:传入 componentUuidsubLibraryId,将对应器件符号吸附到鼠标指针,左键放置、右键取消... QQ_1730278707139

你好!请问如何使用create方法放置原件呀?

@klxf
Copy link
Author

klxf commented Dec 21, 2024

1. 获取鼠标在画布的坐标

如题,获取鼠标在画布的坐标

2. 放置元件

目前的 create 方法需要指定一个坐标才能放置元件, 请求新增一个和如下功能相同的接口:传入 componentUuidsubLibraryId,将对应器件符号吸附到鼠标指针,左键放置、右键取消... QQ_1730278707139

你好!请问如何使用create方法放置原件呀?

https://prodocs.lceda.cn/cn/api/reference/pro-api.sch_primitivecomponent.create.html

像下面这样,libraryUuid 可以用 LIB_LibrariesList 类中的方法获得,元件的 uuid 可以用 LIB_Device 类中的方法获得

libraryUUID = "0819f05c4eef4c71ace90d822a990e87";
componentUUID = "9f9c6cb41c7449fd8acf96aceed2661a";
x = 100;
y = 100;
eda.sch_PrimitiveComponent.create({"libraryUuid": libraryUUID, "uuid": componentUUID}, x, y);

@easyeda2021
Copy link
Collaborator

在最新的2.2.34.8已经支持获取鼠标位置接口

@klxf
Copy link
Author

klxf commented Dec 29, 2024

在最新的2.2.34.8已经支持获取鼠标位置接口

🤔 文档有更新吗
没找到接口文档,请问可以给个链接吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants