Articles in this section

How to Restrict the Resizing of Shape in React Diagram?

This article explains how to restrict the resizing of shapes in React Diagram. In the Syncfusion® React Diagram component, you can restrict the resizing of nodes beyond specific limits by using the minWidth, maxWidth, minHeight, and maxHeight properties. These properties define the minimum and maximum dimensions for a node, ensuring users cannot resize a node outside the specified bounds.

Below is a code example demonstrating how to restrict the resizing of a node:

let nodes = [
 {
   id: 'node1',
   offsetX: 100,
   offsetY: 300,
   width: 100,
   height: 100,
   minWidth: 50,
   maxWidth: 200,
   minHeight: 50,
   maxHeight: 200,
 }
]; 

Refer to the working sample for additional details and implementation: Click Here

Conclusion

We hope you enjoyed learning how to restrict the resizing of shapes in React Diagram.

You can refer to our React 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 React 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, Direct-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied