You need to use EasyEDA editor to create some projects before publishing
API: let user place created shape
564 0
andreasbernhofer 3 years 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.
Comments
Login or Register to add a comment
goToTop
你现在访问的是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 -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus- -mockplus-@1x -mockplus-

Cookie Notice

Our website uses essential cookies to help us ensure that it is working as expected, and uses optional analytics cookies to offer you a better browsing experience. To find out more, read our Cookie Notice