Change minimum lane dimensions

The minimum dimensions for lanes is defined in

export var LANE_MIN_DIMENSIONS = { width: 300, height: 60 };

How can I adjust these dimensions?

I know that I can’t import and change LANE_MIN_DIMENSIONS, since it is read only when imported.


In the meantime, I figured out that I can create a Custom Modeler and then create custom components until I end up in ResizeBehavior:
CustomModeler --> custom ModelingModule --> custom BehaviorModule --> custom ResizeBehavior + ResizeUtil

Please let me know if there is way to directly change behavior in the Modeler without recursively adapting all the components.


LANE_MIN_DIMENSIONS is used in two places:

  1. ResizeBehavior via ResizeUtil
  2. SpaceToolBehavior

Regarding the first component, you could overwrite values written to the context via a listener with lower priority:

export default function CustomResizeBehavior(eventBus) {
  eventBus.on('resize.start', /* any priority lower than 1500 */ 1400 , function(event) {
    var context = event.context,
        shape = context.shape,
        direction = context.direction,
        balanced = context.balanced;

    if (is(shape, 'bpmn:Lane') || is(shape, 'bpmn:Participant')) {
      context.resizeConstraints = /* custom implementation based on function exported by ResizeUtil*/ {};

For the second component, as it is expected to return the value, you would have to set priority to a higher value than in the original component:

export default function CustomSpaceToolBehavior(eventBus) {
  eventBus.on('spaceTool.getMinDimensions', /* higher than 1000 */ 1100, function(context) {
    /* custom implementation based on SpaceToolBehavior */