chore(bpmn-snapping): use injector to call super
This commit is contained in:
parent
ca12ac91a4
commit
5e199694a1
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue