KLayout / klayout

KLayout Main Sources
http://www.klayout.org
GNU General Public License v3.0
803 stars 205 forks source link

Can I use the editing function of the kweb project? #1459

Open WenjunHuang94 opened 1 year ago

WenjunHuang94 commented 1 year ago

Dear author, I have used the functionality of kweb in my own project, but kweb cannot move and edit gds. What should I do? 787ae713c6b1fd44a39d55f31e7f36f

I hope to have MOVE functionality like the Editor version of Klayout. thanks image

klayoutmatthias commented 1 year ago

Yes, that is basically possible, although limited to very basic editing.

You need to create an editable LayoutView on the server side, like this:

pya.LayoutView(true)

The demo code will then allow selecting shapes and moving them. Also new modes should become available such as "polygon", "box" etc.

Please make sure you use the latest klayout module as previous versions had some bugs in that area.

Matthias

sebastian-goeldi commented 1 year ago

Btw, this should be the default behavior in the new kweb. Just be aware that a lot of the edit functionalities don't work, because double click isn't handled properly (yet). Additionally, layer selection also doesn't work yet, therefore polygon drawing etc, doesn't male much sense yet. This is pretty low on the priority list for me, as I don't see huge use cases for any of those functionalities.

Anyway, I think this is much more a kweb problem than klayout. If you have further problems with kweb, I would encourage you to open issues there, instead of directly here, as Matthias is involved in kweb by association because he wrote the prototype for it, canvas2canvas. But most of the current crimes in kweb, are probably mine ;)

klayoutmatthias commented 1 year ago

@sebastian-goeldi Very good. Thanks for commenting :)

You're right, a lot of UI wiring needs to be done and for sure there is a limit somewhere. After all, rebuilding the entire functionality of the client application is not really desirable.

Matthias