chore(bpmn-snapping): use injector to call super

This commit is contained in:
Philipp Fromme 2019-05-20 12:41:11 +02:00 committed by Nico Rehwaldt
parent ca12ac91a4
commit 5e199694a1
1 changed files with 7 additions and 5 deletions

View File

@ -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) {