API: let user place created shape
109 0
andreasbernhofer 2 months ago
Hi, I want to suggest to provide an api that lets you create a shape and let the user place it (the same way when you place a part). When I use `api('createShape',...)` I have to specify the coordinates where the shape is placed implicitly (for svg path based objects) or explicitly. For `SVGNODES` I can use `importByPathD` which lets the user place the shape (however, it will place the shape again and again until the user aborts), but I haven't found an easy way for other shapes. My current workaround for that is a real hack :D I create the shape at the left top of the editor, get its id (which also requires a workaround), select it, call `cut`, fake a click event at the left top to set the reference point and call `paste`. It works however ;) It would be great if `createShape` had options to allow letting the user place the shape (once or multiple times) optionally with a way to set the reference point.
Login or Register to add a comment
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.