klayout icon indicating copy to clipboard operation
klayout copied to clipboard

Can I use the editing function of the kweb project?

Open WenjunHuang94 opened this issue 1 year ago • 3 comments

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

WenjunHuang94 avatar Aug 14 '23 07:08 WenjunHuang94

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

klayoutmatthias avatar Aug 14 '23 19:08 klayoutmatthias

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 ;)

sebastian-goeldi avatar Sep 06 '23 22:09 sebastian-goeldi

@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

klayoutmatthias avatar Sep 07 '23 22:09 klayoutmatthias