Restrict BPMN modeler within window

Hi Team,

I have created the bpmn modeler with scroll bar. However when i tried to insert the diagram in workspace it is scrollable beyond window screen. How to restrict the diagram to not to move upwards at the scroll bar initial position. image|1600x645

Do you mind sharing a screenshot?

flowchart

You see the minimum position of scroll bar at the top position. However the flow chart draggable above container

Have you made yourself familiar with our toolkits? The canvas is infinite by default. You’d need to restrict it.

Thanks philip. It seems the position is working on degrees. Its too difficult to find out the position to restrict it. Kindly confirm how to restrict within visible area instead of infinite in canvas. It will be helpful if you share some idea on code.

I could see this code

  • canvas.viewbox({ x: 100, y: 100, width: 500, height: 500 })

Hi Philip,

Any update on this. Expecting your response.

What have you tried already to achieve this?

Hi Philippe,

I have tried to restrict the position to avoid overflow from container in dragging.js. But nothing worked.

Hi Venkatesh,

I am facing the same issue, did you find the solution?