diff --git a/docs/connect.gaphor b/docs/connect.gaphor new file mode 100644 index 000000000..b49bcc95f --- /dev/null +++ b/docs/connect.gaphor @@ -0,0 +1,939 @@ + + + + +connect + + + + + + + + + +main + + + + + + + +(1.0, 0.0, 0.0, 1.0, 235.0, 235.0) + + +20.0 + + +20.0 + + + + + + + +(1.0, 0.0, 0.0, 1.0, 313.3828125, 230.0) + + +20.0 + + +30.0 + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 322.82421875, 230.0) + + +1 + + +0 + + +[(0.0, 0.0), (0.0, -70.0), (299.6171875, -70.0)] + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 622.44140625, 143.0) + + +30.0 + + +30.0 + + + + + + + +(1.0, 0.0, 0.0, 1.0, 491.9414062499999, 230.0) + + +20.0 + + +30.0 + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 333.3828125, 245.0) + + +0 + + +1 + + +[(0.0, 0.0), (158.5585937499999, 0.0)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 502.8828124999999, 230.0) + + +1 + + +0 + + +[(0.0, 0.0), (0.0, -36.0), (136.0000000000001, -36.0), (136.0000000000001, -57.0)] + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 705.0, 230.0) + + +20.0 + + +30.0 + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 511.9414062499999, 247.0) + + +0 + + +1 + + +[(0.0, 0.0), (193.0585937500001, -2.0)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 255.0, 243.5) + + +0 + + +0 + + +[(0.0, 0.0), (58.3828125, -0.5)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 725.0, 246.0) + + +0 + + +0 + + +[(0.0, 0.0), (110.94140625, 0.0)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 715.4414062499999, 260.0) + + +0 + + +0 + + +[(0.0, 0.0), (0.05859375000011369, 92.5)] + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 835.94140625, 230.0) + + +20.0 + + +30.0 + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 847.94140625, 230.0) + + +1 + + +0 + + +[(0.0, 0.0), (0.0, -69.0), (-195.5, -69.0)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 855.94140625, 244.5) + + +0 + + +0 + + +[(0.0, 0.0), (155.9999999999999, 0.0)] + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 705.0, 352.5) + + +20.0 + + +30.0 + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 725.0, 368.0) + + +0 + + +0 + + +[(0.0, 0.0), (122.94140625, -1.5)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 705.0, 367.0) + + +0 + + +0 + + +[(0.0, 0.0), (-185.0585937500001, 0.5)] + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 1079.94140625, 352.0) + + +30.0 + + +30.0 + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 1059.94140625, 367.5) + + +0 + + +0 + + +[(0.0, 0.0), (20.0, 0.0)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 1094.94140625, 257.5) + + +0 + + +0 + + +[(0.0, 0.0), (0.5, 94.5)] + + + + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 438.94140625, 382.5) + + +1 + + +0 + + +[(0.0, 0.0), (0.0, 85.0), (657.4999999999995, 85.0), (657.4999999999995, -0.5)] + + + + + + + + + + +(1.0, 0.0, 0.0, 1.0, 1011.9414062499999, 227.5) + + +169.0 + + +30.0 + + + + + + + +(1.0, 0.0, 0.0, 1.0, 847.94140625, 352.5) + + +212.0 + + +30.0 + + + + + + + +(1.0, 0.0, 0.0, 1.0, 357.94140625, 352.5) + + +162.0 + + +30.0 + + + + + + + + + +* { + background-color: transparent; + color: black; + font-family: sans; + font-size: 14; + highlight-color: rgba(0, 0, 255, 0.4); + line-width: 2; + padding: 0; +} + +diagram { + background-color: white; + line-style: normal; + /* line-style: sloppy 0.3; */ +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[now allowed] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[not connected] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[opposite end is connected] + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[relation is allowed] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[no subject] + + + + + + + + + + + + + + + +[is same] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +[has subject] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Point to element + + + + + + + + + + + + + + +[subject is different] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Create new model element + + + + + + + + + + + + + + +[No exiting rel.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Use existing relation + + + + + + + + + + + + + + +[Have existing relation] + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/connect.md b/docs/connect.md index 9628fcef0..e749c32a8 100644 --- a/docs/connect.md +++ b/docs/connect.md @@ -6,36 +6,7 @@ GUI point of view, a button release event is what kicks of the decision whether the connection is allowed. Please reference the page on [Items and Elements](items.md) if you need a reminder on the difference between the two. -```eval_rst -Is relation with this element allowed? - No: - do nothing (not even glue should have happened as the same question is - asked there). - Yes: - connect_handle() - Is opposite end connected? - - No: - Do nothing - Yes: - Does the item already have a subject element relation? - Yes: - Is the previous item the same as the current? - Yes: - Do nothing - - No: - Let subject end point to the new element - - No: - Create relation or find existing relation in model - - Search for an existing relation in the model: - Found: - Use that relation - Nothing: - Create new model elements and connect to item -``` +![connection chart](connect/main.svg) The check if a connection is allowed should also check if it is valid to create a relation to/from the same element (like associations, but not diff --git a/docs/connect/main.svg b/docs/connect/main.svg new file mode 100644 index 000000000..108c17e39 --- /dev/null +++ b/docs/connect/main.svg @@ -0,0 +1,405 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +