Snapping to grid does not work for non-default-sized service tasks

I am using and have combined the modules/plugins for resizing, grid-snapping and diagram-js-grid.
You can see in the picture that i have a problem that the services do not snap to the grid correctly:

Actually, the service on the right correct snaps on the grid. It is the default service task with default dimensions of 100x80. As soon as i create a service with different dimensions, the do not correctly snap to the grid. Not even talking about uneven sizes. I used sizes of multiples of ten only (size of the grid) but still. Any idea what might be the issue?

Resize module i think we can ignore because the issue also occures without this module if i create shapes like this with a non-standard dimension:

                    const shape = self._elementFactory.createShape({
                        type: 'bpmn:ServiceTask',
                        businessObject: businessObject,
                        width: 110,
                        height: 50

Hi, can you explain your issue in more detail? What are you doing, what is happening and what is the expected behavior?

For me, snapping works also with resized elements:
Recording 2023-07-31 at 15.37.49

I have created a minimal example.

git clone

npm install
npm start

Service is not snapping to grid:

What is the behavior you are expecting and what exactly is not working as expected?

Grid-Snapping makes aligning your elements on the same axis easier and highlights these lines. As far as I can tell from your example, that still works.

It does not prevent you from placing elements outside of the grid lines to create new lanes.

Hi Martin,
My expectation was from the name that the grid-snapping module snaps it to a fixed grid. I added the plugin that visually shows the grid and was assuming that it would snap to it. So this is wrong assumption? it just snaps to lines where other elements are on?
If you see my screenshot, if i move the element vertically, there is no other element on that line; but it snaps to some position off grid. So is that intended behaviour?