We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Diagram template connector position

hi,

I have created a html element as a template annotation in a connector, but i would like for it to be centered on the "line" at all times.
But your demo and my project have the same issue, is that it sticks left and follows the uppermost parent/element when dragging a "point".

Example using your demo: try drawing a circle while holding the targetpoint/ID, the htmlelement stick to the left most element+ uppermost.

If that's impossible, is it then possible to set the x and y position of the template? That would work fine for me too.(just like setting positions for nodes). I will just set it then with a changeEvent of the connectors.

have a nice day!

greetings,

Laurens

Angualr 7+, TypeScript 3+

3 Replies

RT Ramya Thirugnanam Syncfusion Team May 21, 2019 10:15 AM UTC

Hi Laurens, 
 
Please set the width and height for the annotation which has template to resolve the issue. Please find the code example and kb document as below. 
 
Code example: 
annotations: [{ id:"label1", template:'<div><input type="button" value="Submit"></div>', width:50 , height:20}] 
 
 
 
 
We will fix the issue with provided code example in help documentation. We will refresh the help documentation on May 29th 2019.  
 
Regards, 
Ramya T 



LA Laurens Albers May 21, 2019 01:04 PM UTC

hi,

Thanks, your answer works great!

greetings,

Laurens 


RT Ramya Thirugnanam Syncfusion Team May 22, 2019 04:50 AM UTC

Hi Laurens, 
 
Thanks for you update. 
 
Regards, 
Ramya T 


Loader.
Live Chat Icon For mobile
Up arrow icon