Prevention if resize of shape in a particular diection

Hi,
How can I prevent a shape from being resized in a particular direction?

Thanks and Regards
Rajender

Implement a resize rule similar to the one in bpmn-js BpmnRules.js#L70.

Checkout the example for adding custom rules to learn more about rules.