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
close icon

How to use align() in vue2?

Hi.


Can you provide an example of how to use the align method to align nodes in a diagram?
I tried using "this.$refs.diagramObject.ej2Instances.align();" to add this functionality, but it doesn't seem to work.



1 Reply

SJ Sivaranjith Jeyabalan Syncfusion Team April 6, 2023 07:37 AM UTC

Hi,

We can align nodes and connectors using diagram.align() method. We have created a sample in which we used select box to choose alignment option and aligned the nodes on button click. Please find the sample and documentation link below.


Documentation: https://ej2.syncfusion.com/angular/documentation/api/diagram/#align




Attachment: diagramAlign_235501de.zip

Loader.
Live Chat Icon For mobile
Up arrow icon