homotopy-rs icon indicating copy to clipboard operation
homotopy-rs copied to clipboard

Render vertices as boxes

Open calintat opened this issue 3 years ago • 13 comments

As discussed in our meeting today, it would be nice to have an option to render vertices as boxes instead of points.

calintat avatar Apr 26 '22 13:04 calintat

You mean vertices, not 0-cells.

jamievicary avatar Apr 26 '22 13:04 jamievicary

Yes oops.

calintat avatar Apr 26 '22 14:04 calintat

@thud to clarify what we mean here, we want the option to draw vertices as boxes with vertical wires going in/out:

Screenshot 2022-06-28 at 09 37 43

I just realised this might be trickier than I expected, so let's start by replacing the vertices with boxes (these can be squares for now). After that, we can think about making the wires vertical, which will also require changing the surfaces.

Ideally, this will be an option that can be toggled for each generator (#520), but for now it's fine if this is a global setting.

calintat avatar Jun 28 '22 08:06 calintat

Thanks, that clears it up a little. I've been working on making the vertices individually restylable (ie. each vertex can be a box or a circle or some other shape). I think this will be relatively straightforward to finish but it may conflict slightly with the global setting.

For now I'll keep working on individual styles. Let me know if I should refocus on the global setting instead.

thud avatar Jun 28 '22 09:06 thud

Perfect, that's even better.

calintat avatar Jun 28 '22 09:06 calintat

Quick written update on this: currently working on changing the shape of individual vertices.

Changes to state management will be non-trivial as it stands. Next attempt at implementation will involve sharing the GeneratorInfo struct with homotopy-graphics.

thud avatar Jun 30 '22 13:06 thud

Nice work @thud! Maybe split out a GeneratorStyle struct that can be shared rather than sharing the whole GeneratorInfo?

Let me know if you need a hand making your state changes backwards compatible with the serialiser!

cofibrant avatar Jul 01 '22 09:07 cofibrant

Maybe split out a GeneratorStyle struct that can be shared rather than sharing the whole GeneratorInfo?

Oh yeah, that's much better actually. I'll work that through today and see what I can get running.

thud avatar Jul 01 '22 09:07 thud

We might also need the name if say we decided to label the vertices, so it might be good to share the whole GeneratorInfo just for future convenience.

calintat avatar Jul 01 '22 09:07 calintat

We definitely need tooltips showing the generator name when we hover the mouse cursor over the diagram.

On Fri, 1 Jul 2022, 11:29 Calin Tataru, @.***> wrote:

We might also need the name if say we decided to label the vertices, so it might be good to share the whole GeneratorInfo just for future convenience.

— Reply to this email directly, view it on GitHub https://github.com/homotopy-io/homotopy-rs/issues/460#issuecomment-1172140146, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQ4OHQQBTZ65XLWBTTBHO3VR227BANCNFSM5UL5EVJA . You are receiving this because you commented.Message ID: @.***>

jamievicary avatar Oct 11 '22 07:10 jamievicary

We already have that right? Also it's not related to this bug I think.

calintat avatar Oct 11 '22 10:10 calintat

This is a GitHub bug. I made that comment months ago by email and it only just got processed.

jamievicary avatar Oct 11 '22 11:10 jamievicary

Haha interesting.

calintat avatar Oct 11 '22 13:10 calintat