Set style for selected nodes or connectors

Is there way to pre-configure a selection style for nodes and connectors?
For example, if I select a node, I want to change its rubber band color and node's shadow.

Interaction in Angular Diagram component - Syncfusion this docs says that I have to listen to  the selectionChange event in order to make customizations, but is it the only way? And how could I change the styles of the rubber band selection?


1 Reply 1 reply marked as answer

AR Aravind Ravi Syncfusion Team April 28, 2022 10:36 AM UTC

Hi Camila,


Please find the response for queries in the below table


How could I change the styles of the rubber band selection

By using the diagram css you can able to change the style of the rubber band selection. We have overridden the rubber band stroke color using diagram css. Please refer to below code snippet and sample

 

<style>

    .e-diagram-selected-region {

        stroke: blue;

    }

</style>

 

Sample:   https://stackblitz.com/edit/angular-xq8cyg?file=app.component.html

Node's shadow.

Diagram provides support to add shadow effect to a node that is disabled, by default. It can be enabled with the constraints property of the node. The angle, distance, and opacity of the shadow can be customized with the shadow property of the node. Please refer to below UG documentation for how to apply shadow for the node

 

UG Link: https://ej2.syncfusion.com/angular/documentation/diagram/nodes/#customizing-shadow


Regards

Aravind Ravi


Marked as answer
Loader.
Up arrow icon