You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
599 B
25 lines
599 B
import { isAny } from '../modeling/util/ModelingUtil'; |
|
|
|
export default function BpmnGridSnapping(eventBus) { |
|
eventBus.on([ |
|
'create.init', |
|
'shape.move.init' |
|
], function(event) { |
|
var context = event.context, |
|
shape = event.shape; |
|
|
|
if (isAny(shape, [ |
|
'bpmn:Participant', |
|
'bpmn:SubProcess', |
|
'bpmn:TextAnnotation' |
|
])) { |
|
if (!context.gridSnappingContext) { |
|
context.gridSnappingContext = {}; |
|
} |
|
|
|
context.gridSnappingContext.snapLocation = 'top-left'; |
|
} |
|
}); |
|
} |
|
|
|
BpmnGridSnapping.$inject = [ 'eventBus' ]; |