How to change size (width, height) of node will be auto change size of all child nodes with same rate by code

How to change size (width, height) of node will be auto change size of all child nodes with same rate by code


3 Replies

AM Arunkumar Manoharan Syncfusion Team January 20, 2022 11:43 AM UTC

Hi PhuND,

Could you please confirm whether you need to resize a group node along with its children at runtime? If yes, we have created a sample in which we have rendered a group node and updated its size along with the children dynamically. If we misunderstood your requirement, could you please share more details such as modifying the below sample or sharing your exact requirement with video/screenshot.


Code sample:

<button id='Changesize'>Changesize</button>

 

let Changesize = document.getElementById('Changesize');

Changesize.onclick = function () {

  diagramInstance.nameTable.group.height = 100;

  diagramInstance.nameTable.group.width = 200;

};

 


Sample: https://stackblitz.com/edit/react-jjbmni-sjvxb5?file=index.js


Regards

Arun Kumar.



PH PhuND replied to Arunkumar Manoharan March 3, 2022 08:47 AM UTC

Thank you Arun Kumar, it work



SG Shyam G Syncfusion Team March 4, 2022 10:41 AM UTC

Hi PhuND,


Thanks for your update.


Regards,

Shyam G


Loader.
Up arrow icon