diff --git a/lib/features/snapping/BpmnSnapping.js b/lib/features/snapping/BpmnSnapping.js index b484342a..921fdb36 100644 --- a/lib/features/snapping/BpmnSnapping.js +++ b/lib/features/snapping/BpmnSnapping.js @@ -38,11 +38,13 @@ var HIGH_PRIORITY = 1500; /** * BPMN-specific snapping. * + * @param {BpmnRules} bpmnRules + * @param {ElementRegistry} elementRegistry * @param {EventBus} eventBus - * @param {Canvas} canvas + * @param {Injector} injector */ -export default function BpmnSnapping(bpmnRules, canvas, elementRegistry, eventBus) { - Snapping.call(this, eventBus, canvas); +export default function BpmnSnapping(bpmnRules, elementRegistry, eventBus, injector) { + injector.invoke(Snapping, this); function canAttach(shape, target, position) { return bpmnRules.canAttach([ shape ], target, null, position) === 'attach'; @@ -181,9 +183,9 @@ inherits(BpmnSnapping, Snapping); BpmnSnapping.$inject = [ 'bpmnRules', - 'canvas', 'elementRegistry', - 'eventBus' + 'eventBus', + 'injector' ]; BpmnSnapping.prototype.initSnap = function(event) {