Default node constraints definition does not match documentation

Quoting from the documentation @ https://help.syncfusion.com/api/js/ejdiagram#members:nodes-constraints ..

However, this is not the case. Shadow, for example, is turned off if I use `ej.datavisualization.Diagram.NodeConstraints.Default` as my node constraint. If I set the node constraint to `ej.datavisualization.Diagram.NodeConstraints.Default | ej.datavisualization.Diagram.NodeConstraints.Shadow` I get the shadow as expected


3 Replies

SG Shyam G Syncfusion Team October 10, 2017 12:45 PM UTC

Hi Julian, 
 
We have included some common behaviors such as Select,Delete,Drag etc to the Default node constraints. If you need to enable other behaviors such as shadow,AspectRatio,AllowDrop, then add that constraints along with the Default constraints. Also you can refer other competitors such as Visio in which they have disabled the shadow constraints initially. To enable shadow constraints for all nodes, please define it in defaultSettings node property as shown in the below code example 
 
Code example: 
  $("#diagram").ejDiagram({              
                defaultSettings: { 
                    node: { 
                         //enable shadow constraints 
                        constraints: ej.datavisualization.Diagram.NodeConstraints.Default | ej.datavisualization.Diagram.NodeConstraints.Shadow, 
                    },                    
                } 
            }); 
 
Regards, 
Shyam G 



JL Julian Lyndon-Smith October 11, 2017 09:17 AM UTC

the point I was trying to make is that the documentation says that the default setting has all options enabled

Default: Enables all node constraints






SG Shyam G Syncfusion Team October 12, 2017 06:26 AM UTC

Hi Julian, 
 
We will change the content of default NodeConstraints in the UG documentation and let you know once it is refreshed online. 
 
Regards, 
Shyam G 


Loader.
Up arrow icon