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

UI: If there are multiple state outcome nets between two states, then their tags will overlap. #11

Open
josephcoombe opened this issue Dec 6, 2017 · 2 comments

Comments

@josephcoombe
Copy link

Suppose you have 2 states A and B, each with two outcomes 'x' and 'y'

If you connect state A's outcome 'x' to state B, and
state B's outcome 'y' to state A, then
the state outcome nets between the two states (and their tags) will overlap,
meaning that you will only see one line and either 'x' or 'y'.


Perhaps, nets between 2 states should be routed differently (based on origin). Then you'd see 2 distinct lines between state A and state B. One line for the transition from A to B and one for the transition from B to A.

In the case of multiple transitions in one directions, I think it would be best to only render one line and simply display separate tags for each transitions (e.g. If both 'x' and 'y' from state A are connected to state B, then only one line with separate 'x' and 'y' bubbles would be displayed)

@pschillinger
Copy link
Member

pschillinger commented Dec 7, 2017 via email

@AndyIII
Copy link

AndyIII commented Mar 7, 2018

I made this quick change in drawable_transitions.js:34 and it helps some. There are still a few corner cases where the selection of which side to attach to is weird, but it works for me. Basically, it has outgoing connections come from a different spot than ingoing connections.

	var bb1 = from.getBBox(),
	    bb2 = to.getBBox(),
        p = [{x: bb1.x + bb1.width / 4, y: bb1.y - 1},
        {x: bb1.x + bb1.width * 3 / 4, y: bb1.y + bb1.height + 1},
        {x: bb1.x - 1, y: bb1.y + bb1.height * 3 / 4},
        {x: bb1.x + bb1.width + 1, y: bb1.y + bb1.height / 4},
        {x: bb2.x + bb2.width * 3 / 4, y: bb2.y - 1},
        {x: bb2.x + bb2.width / 4, y: bb2.y + bb2.height + 1},
        {x: bb2.x - 1, y: bb2.y + bb2.height / 4},
        {x: bb2.x + bb2.width + 1, y: bb2.y + bb2.height * 3 / 4}],
		d = {}, dis = [];

fmessmer added a commit to fmessmer/flexbe_app that referenced this issue Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants