How to Change Stroke Style Color when Dragging Node into Vue Diagram?
This article explains how to change the stroke style color when dragging a node into the Vue Diagram. Syncfusion® Vue Diagram provides the ability to customize the style of the highlighter. You can modify the stroke color of the highlighter when dragging and dropping a node over another element by using the .e-diagram-highlighter class.
Enabling Highlighter for a Node
To enable the highlighter for a node, you need to set the allowDrop constraints for that specific node. This can be achieved by modifying the node’s constraints as shown in the following example:
{
id: 'node1',
offsetX: 300, offsetY: 300,
height: 100, width: 100,
constraints: NodeConstraints.Default | NodeConstraints.AllowDrop
}
Customizing the Highlighter Style
The highlighter’s style can be customized using CSS. For instance, to change the stroke color of the highlighter, you need to define the style for the .e-diagram-highlighter class as follows:
<style>
.e-diagram-highlighter {
stroke: blue;
}
</style>
Refer to the working sample for additional details and implementation: Click here for sample
Conclusion
We hope you enjoyed learning about how to change the stroke style color when dragging a node into Vue Diagram.
You can refer to our Vue Diagram feature tour page to learn about its other groundbreaking feature representations and documentation, and how to quickly get started with configuration specifications. You can also explore our Vue Diagram example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!