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.
|
* BPMN-specific snapping.
|
||||||
*
|
*
|
||||||
|
* @param {BpmnRules} bpmnRules
|
||||||
|
* @param {ElementRegistry} elementRegistry
|
||||||
* @param {EventBus} eventBus
|
* @param {EventBus} eventBus
|
||||||
* @param {Canvas} canvas
|
* @param {Injector} injector
|
||||||
*/
|
*/
|
||||||
export default function BpmnSnapping(bpmnRules, canvas, elementRegistry, eventBus) {
|
export default function BpmnSnapping(bpmnRules, elementRegistry, eventBus, injector) {
|
||||||
Snapping.call(this, eventBus, canvas);
|
injector.invoke(Snapping, this);
|
||||||
|
|
||||||
function canAttach(shape, target, position) {
|
function canAttach(shape, target, position) {
|
||||||
return bpmnRules.canAttach([ shape ], target, null, position) === 'attach';
|
return bpmnRules.canAttach([ shape ], target, null, position) === 'attach';
|
||||||
|
@ -181,9 +183,9 @@ inherits(BpmnSnapping, Snapping);
|
||||||
|
|
||||||
BpmnSnapping.$inject = [
|
BpmnSnapping.$inject = [
|
||||||
'bpmnRules',
|
'bpmnRules',
|
||||||
'canvas',
|
|
||||||
'elementRegistry',
|
'elementRegistry',
|
||||||
'eventBus'
|
'eventBus',
|
||||||
|
'injector'
|
||||||
];
|
];
|
||||||
|
|
||||||
BpmnSnapping.prototype.initSnap = function(event) {
|
BpmnSnapping.prototype.initSnap = function(event) {
|
||||||
|
|
Loading…
Reference in New Issue