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

Disable selection for child nodes of a group

Hi,

I have attached sample project in which I have two questions.

1) I have a group node with 6 child nodes. I want to enable selection to group node but not for individual nodes themselves. 
I have tried applying Node Constraints which works to some extent.However, It stops the selection of the group node along with the child nodes. So if I disable "Select" node constraint to all the child nodes, I can't drag or do anything with the group node itself. Can you please give me a workaround for this.
I have also attached the snip of the console error I get when I drag the group which I cant figure out.

2) In my original project, I am using Diagram Builder sample in which I have Image nodes in the symbol palette. Occasionally, When I drag a palette item from the symbol palette, clones of the same palette item are displayed with no console errors.
 

Thank you.

Regards,
Indrani

Attachment: SyncfusionMvcApplication17_e7cfa579.7z

6 Replies

IG indrani Gajjarapu March 17, 2017 05:24 PM UTC

Hi, 

please find the attached copy of console errors when group node is dragged.

Thank you.

Attachment: groupnodeError_e9697420.zip


SG Shyam G Syncfusion Team March 20, 2017 10:44 AM UTC

Hi Indrani, 

Query 
Response 
 I have a group node with 6 child nodes. I want to enable selection to group node but not for individual nodes themselves.  
I have tried applying Node Constraints which works to some extent.However, It stops the selection of the group node along with the child nodes. So if I disable "Select" node constraint to all the child nodes, I can't drag or do anything with the group node itself. Can you please give me a workaround for this. 
I have also attached the snip of the console error I get when I drag the group which I cant figure out. 
Please set PointerEvents constraints for the group child nodes to achieve your requirement. Please refer to the code example below. 

Code example: 
//Disable pointerEvents 
hexagon.Constraints = NodeConstraints.Default &~ NodeConstraints.PointerEvents; 

Also we have modified your sample and attached below. 
 In my original project, I am using Diagram Builder sample in which I have Image nodes in the symbol palette. Occasionally, When I drag a palette item from the symbol palette, clones of the same palette item are displayed with no console errors. 
The reported issue occurs due to an propertyEditor which is not defined in your application. We have removed the propertyEditor line as shown in the below code example from the sample and attached the modified sample below. 
 
Code example: 
 
document.getElementById("propertyEditor").style.display 


Regards, 
Shyam G 



IG indrani Gajjarapu March 20, 2017 11:01 AM UTC

Hi Shyam,

PointerEvents constraints did fix the first issue.

But the clones of image node still exists in the modified sample project as well.

I have attached a snip of imageNode clones occurred when I executed modified sample project.

Thank you.

Regards,

Indrani


Attachment: Clones_e9a1abd8.zip


SG Shyam G Syncfusion Team March 21, 2017 05:12 AM UTC

Hi Indrani, 

·         You have defined image node name with spaces(Square Table). So please define it without spaces(SquareTable) to resolve your reported issue. 
·         Also while defining the name for HTML elements, certain procedures are to be followed. Please see the link below 
 
 
 
Please refer to the modified code example below. 
 
Code example: 
ImageNode squareTable = new ImageNode(); 
squareTable.Name = "SquareTable"; 
  
  
Regards, 
Shyam G 



IG indrani Gajjarapu March 22, 2017 09:22 AM UTC

Hi Shyam,

Thanks for your reply. 

Regards,

Indrani


SG Shyam G Syncfusion Team March 23, 2017 05:43 AM UTC

Hi Indrani, 
Please let us know if you need further assistance on this. 
Regards, 
Shyam G 


Loader.
Live Chat Icon For mobile
Up arrow icon