So your element is a bpmn:UserTask
? Tasks have a width of 100 and height of 80. Not respecting these dimensions when rendering it means that all other features like the hitbox will still assume the 100,80
dimensions. As you can see the result is that visual and hitbox don’t match. To fix this issue you need to actually assign the custom dimensions to the element. You could override ElementFactory
with a copy that changes the default size of user tasks (cf. bpmn-js/ElementFactory.js at develop · bpmn-io/bpmn-js · GitHub) or add a command interceptor that assigns custom dimensions to newly created user tasks (cf. diagram-js/CommandInterceptor.js at develop · bpmn-io/diagram-js · GitHub).
2 Likes