Hello,
I have a few problems with my UML class connector. I can add it to my palette and drag/drop it in the diagram. This works well. But when I set it as followed in my palette I get the following problems:
- For some reason I get a dashed connector instead of straight.
- When I set the type as ManyToMany, the source and target annotations don't show up. It should show an annotation as '1...*'. For everyone other type (OneToMany, ManyToOne, OneToOne) the annotations appear as they should.
- targetDecorator: { shape: 'None' } doesn't seem to work to remove the arrow at the target. The arrow still shows.
This is my code:
[{
id: "umlConn",
//Define connector start and end points
sourcePoint: { x: 0, y: 0 },
targetPoint: { x: 60, y: 60 },
type: "Straight",
shape: {
type: "UmlClassifier",
relationship: "Dependency",
multiplicity: {
//Set multiplicity type
type: "ManyToMany",
//Set source label to connector
source: {
optional: false,
lowerBounds: 1,
upperBounds: '*'
},
//Set target label to connector
target: {
optional: false,
lowerBounds: 1,
upperBounds: '*'
}
}
},
targetDecorator: { shape: 'None' },
}]I get this:
So I need to know: How do I get annotations to show up when type is ManyToMany. How do I hide the arrow at the end? How do I make the line straight instead of dashed.
Thanks!
Hi,
|
Query |
Solution |
|
For some reason I get a dashed connector instead of straight.
targetDecorator: { shape: 'None' } doesn't seem to work to remove the arrow at the target. The arrow still shows.
|
In syncfusion diagram, you cannot change source and target decorator shape for UML class connector. It is a default behavior. You can get the solid connector by setting the relationship property as “Association”. Refer to the below UG Documentation. Documentation https://ej2.syncfusion.com/vue/documentation/diagram/umldiagram#connector-shapes
|
|
When I set the type as ManyToMany, the source and target annotations don't show up. It should show an annotation as '1...*'. For everyone other type (OneToMany, ManyToOne, OneToOne) the annotations appear as they should. |
We can able to replicate the issue at our end. We will validate and update you on June 2,2023. |
Regards,
Vivisa
Thanks for the reply.
Also, there seems to be an inconsistency in the way the annotations at the source and target appear with the multiplicity connector.
OneToMany will show 1 -> 1
OneToMany will show 1 -> 1...*
But ManyToOne will show 1...* -> 1...1
To be consistent, ManyToOne should show 1...* -> 1
Also, when we have the "Many" sign ("*"), it would be nice to be able to show it has only "*" not "1...*". Is this possible? I can't make it work. It should be possible by only setting an upperBound and no lowerBound, but this causes an error.
Here is a screen shot and my code
let umlClassConnectorSymbols = [
{
id: "UmlManyToMany",
//Define connector start and end points
sourcePoint: { x: 0, y: 0 },
targetPoint: { x: 60, y: 60 },
type: "Straight",
shape: {
type: "UmlClassifier",
relationship: "Dependency",
multiplicity: {
//Set multiplicity type
type: "ManyToMany",
//Set source label to connector
source: {
optional: true,
lowerBounds: '1',
upperBounds: '*'
},
//Set target label to connector
target: {
optional: true,
lowerBounds: '1',
upperBounds: '*'
}
}
},
targetDecorator: { shape: 'None' },
},
{
id: "UmlManyToOne",
//Define connector start and end points
sourcePoint: { x: 0, y: 0 },
targetPoint: { x: 60, y: 60 },
type: "Straight",
shape: {
type: "UmlClassifier",
relationship: "Dependency",
multiplicity: {
//Set multiplicity type
type: "ManyToOne",
//Set source label to connector
source: {
optional: true,
lowerBounds: 1,
upperBounds: '*'
},
//Set target label to connector
target: {
optional: true,
lowerBounds: 1,
upperBounds: 1
}
}
},
targetDecorator: { shape: 'None' },
},
{
id: "UmlOneToMany",
//Define connector start and end points
sourcePoint: { x: 0, y: 0 },
targetPoint: { x: 60, y: 60 },
type: "Straight",
shape: {
type: "UmlClassifier",
relationship: "Dependency",
multiplicity: {
//Set multiplicity type
type: "OneToMany",
//Set source label to connector
source: {
optional: true,
lowerBounds: 1,
upperBounds: 1
},
//Set target label to connector
target: {
optional: true,
lowerBounds: 1,
upperBounds: '*'
}
}
},
targetDecorator: { shape: 'None' },
},
{
id: 'UmlOneToOne',
//Define connector start and end points
sourcePoint: { x: 0, y: 0 },
targetPoint: { x: 60, y: 60 },
type: "Straight",
shape: {
type: "UmlClassifier",
relationship: "Dependency",
multiplicity: {
//Set multiplicity type
type: "OneToOne",
//Set source label to connector
source: {
optional: false,
upperBounds: 1
},
//Set target label to connector
target: {
optional: false,
upperBounds: 1
}
}
},
targetDecorator: { shape: 'None' },
}
]
Thanks
Hi,
|
Query |
Solution |
|
When I set the type as ManyToMany, the source and target annotations don't show up. It should show an annotation as '1...*'. For everyone other type (OneToMany, ManyToOne, OneToOne) the annotations appear as they should. |
Reported Issue: UML class connector annotation for ManyToMany relationship not working properly We can reproduce the issue and confirmed this as a defect. We have logged a defect report for this issue. We will fix this issue and provide the patch on June 20,2023 weekly patch release.
|
|
Also, when we have the "Many" sign ("*"), it would be nice to be able to show it has only "*" not "1...*". Is this possible? I can't make it work. It should be possible by only setting an upperBound and no lowerBound, but this causes an error. Here is a screen shot and my code
|
Currently, we don’t have the option to edit the annotation. We will validate and update you with more details on June 6,2023. |
Regards,
Vivisa
Hi ,
Currently we don’t have support to edit annotation for UML class connector. We have logged it as a feature, we don’t have any immediate plan to implement this feature. You can communicate with us or track the status of the feature using the below feedback link.
Feedback link:
https://www.syncfusion.com/feedback/44321/support-to-edit-the-annotation-for-uml-class-connector
Regards,
Vivisa
Hi ,
Reported Issue: UML class connector annotation for ManyToMany relationship not working properly
Due to our volume 2 release, the weekly release will rollout on next week June 27,2023
Regards,
Gobinath
Hi ,
We have fixed the reported issue and included it in our latest patch release, which is rolled out successfully.
Please upgrade to the latest version (v22.1.36) packages of the diagram to resolve this issue.
https://www.npmjs.com/package/@syncfusion/ej2-diagrams
Regards,
Gobinath