theia-ide / sprotty

A next-gen web-based graphics framework
Apache License 2.0
138 stars 23 forks source link

Add diamond nodes #237

Closed planger closed 6 years ago

planger commented 6 years ago

This change introduces a diamond shaped node with proper anchoring of connections. With that, we address usecase 2 of #235. See in particular https://github.com/theia-ide/sprotty/issues/235#issuecomment-419215072.

If you want to try it out, I integrated the new diamond node into the circles example in branch https://github.com/planger:sprotty/tree/issue235-2-with-example. Anyway, below are two screenshots of a couple of nodes with equal and different width/height.

image

image

planger commented 6 years ago

Thanks for your fast feedback! I've simplified the point shifting and improved documentation.

Note, however, that Sprotty is currently in the process of moving to Eclipse. We already created the initial contribution for the new Eclipse repository, so we would need to reapply your changes on that repository when it's available.

I see. Will the code also be moved to an Eclipse repository with Gerrit, or will it stay on Github? I guess it's easiest to just keep this PR open until the CQ is sorted out? Thanks a lot!

JanKoehnlein commented 6 years ago

We're going to stick to GitHub.

spoenemann commented 6 years ago

@planger I will notify you when the Eclipse GitHub repo is ready. Maybe then you could create a new PR on that repo to make sure the IP requirements of Eclipse are met.

planger commented 6 years ago

Thanks a lot! I'll be happy to create a new PR once the new Eclipse repo is available.

spoenemann commented 6 years ago

@planger the new repo is ready for contributions: https://github.com/eclipse/sprotty

planger commented 6 years ago

@spoenemann Great, thanks for letting me know. I made myself a task to contribute this change in the new Eclipse repo. I'll do that at latest beginning of next week. Thanks!

planger commented 6 years ago

@spoenemann Thanks again for pointing me to the new repo. I've opened a new PR for this change, see https://github.com/eclipse/sprotty/pull/3.