Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'External' transition to sub-state/super-state is rendered as 'internal' with floating arrow #123

Open
hefroy opened this issue May 31, 2020 · 2 comments
Labels

Comments

@hefroy
Copy link

hefroy commented May 31, 2020

'External' transitions exit a state and re-enter, and should be rendered as an arrow leaving the outermost state and re-entering. This works when the target state is the same as the source, but when the target is a sub-state or super-state, the arrow is not shown as leaving the outermost state and one of the ends of the arrow is floating.

Expected Behavior

  • External transitions should show the arrow leaving the outermost state and re-entering, see here.
  • The start and end of the transition arrow should be on the edges of the source and target state rectangles.

Current Behavior

  • External transitions to super-states and sub-states are rendered as internal transitions (a.k.a. local transitions): the arrow remains within the outermost state.
  • When transitioning to a sub-state, the beginning of the arrow is not on the edge of the source state.
  • When transitioning to a super-state, the end of the arrow is not on the edge of the target state.

Steps to Reproduce

a {
  b;
},
c {
  d;
};
a -> b;
d -> c;

The default transition type is external, so there's no need to specify it (but doing so also doesn't work).

Context

Support for internal/external transitions is present, so you'd expect this to work.

Your Environment

https://state-machine-cat.js.org/
Version: 7.0.3

@hefroy hefroy changed the title 'External' transition to sub-state/super-state is rendered as 'internal' 'External' transition to sub-state/super-state is rendered as 'internal' with floating arrow May 31, 2020
@sverweij
Copy link
Owner

Hi @hefroy this was indeed not implemented in the graph rendering - and I agree it should. I'll try to make it better and be targeting this (LMK if that's off):

better

@hefroy
Copy link
Author

hefroy commented May 31, 2020

Hi @sverweij, yep that looks much better. Thanks for the fast response again!

@sverweij sverweij added the bug label Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants