not possible to listen to events
I followed your example on
https://ej2.syncfusion.com/blazor/documentation/diagram/native-events/
to set events to the diagram.
It was not possible:
1. your example-cdoe uses UIMouseEventArgs which are now MouseEventArgs
2. When I try exactly the example I get the following error:
System.AggregateException: One or more errors occurred. (InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '@onmousedown' is not a valid attribute name.)
---> System.InvalidOperationException: InvalidCharacterError: Failed to execute 'setAttribute' on 'Element': '@onmousedown' is not a valid attribute name.
at Microsoft.AspNetCore.Components.RenderTree.Renderer.InvokeRenderCompletedCallsAfterUpdateDisplayTask(Task updateDisplayTask, Int32[] updatedComponents)
--- End of inner exception stack trace ---
SIGN IN To post a reply.
4 Replies
SG
Shyam G
Syncfusion Team
January 14, 2020 10:19 AM UTC
Hi Tobias,
Reported Issue : Native events doesn’t work for diagram components
We can reproduce the issue. We have confirmed this as a defect. We have logged a defect report for this issue. We will fix this issue and provide the patch on weekly patch release 21th January, 2020.
Now, you can track the status of your request through below feedback link.
Feedback Link: https://www.syncfusion.com/feedback/11285/native-events-doesnt-work-for-diagram-components
Regards,
Shyam G
SG
Shyam G
Syncfusion Team
January 22, 2020 10:23 AM UTC
Hi Tobias,
Reported Issue : Native events doesn’t work for diagram components
We have fixed the reported issue and included it in our patch release (v17.4.44) which is rolled out successfully.
Please upgrade to the latest version packages to resolve this issue.
Regards,
Shyam G
TK
Tobias Koller
January 22, 2020 10:28 AM UTC
yes it now works perfect.
thank you.
Is there a way to disable label-edit-functionallity on double-click of node?
Tobias
SG
Shyam G
Syncfusion Team
January 23, 2020 09:04 AM UTC
Hi Tobias,
Please set AnnotationConstraints as ReadOnly to disable the editing of label at runtime. Please refer to a code example, help documentation and the sample below.
Code example:
|
DiagramNode node1 = new DiagramNode()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Annotations = new ObservableCollection<DiagramNodeAnnotation>()
{
new DiagramNodeAnnotation()
{
Content = "Node",
Constraints = AnnotationConstraints.ReadOnly
}
},
Style = new NodeShapeStyle() { Fill = "#6BA5D7", StrokeColor = "white" }
}; |
Help documentation: https://ej2.syncfusion.com/blazor/documentation/diagram/labels/?no-cache=1#read-only-annotations
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/AnnotationSample-701415238
Regards,
Shyam G
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
TK Tobias Koller
- Jan 13, 2020 07:25 AM UTC
- Jan 23, 2020 09:04 AM UTC