Search
NodeConstraints.keepRatio Property
See Also
 





Gets or sets a value indicating whether the initial width/height ratio of a node should be preserved.

Namespace: MindFusion.Diagramming
File: NodeConstraints.js

 Syntax

JavaScript  Copy Code

get keepRatio() {}
set keepRatio(value) {}

 Property Value

Boolean

true to preserve the initial width/height ratio of a node, or false othwerise. The default is false.

 Remarks

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.

 See Also