Gets or sets a value indicating whether the initial width/height ratio of a node should be preserved.
Namespace: MindFusion.Diagramming
File: NodeConstraints.js
JavaScript Copy Code |
---|
get keepRatio() {} |
Boolean
true to preserve the initial width/height ratio of a node, or false othwerise. The default is false.
If you enable this property from a custom node class' constructor or an initialization-event handler, the node will keep an aspect ratio of 1:1. Thus you could let users draw perfect square or circle shapes by setting keepRatio to true from the initializeNode handler.
MindFusion.Diagramming for JavaScript Programmer's Guide | © 2025 MindFusion |