style(snapping): use constant instead of magic number

This commit is contained in:
Nico Rehwaldt 2016-06-22 18:15:20 +02:00
parent 9c236b0d9e
commit 1743c63d91
1 changed files with 6 additions and 4 deletions

View File

@ -27,6 +27,8 @@ var getBoundaryAttachment = require('./BpmnSnappingUtil').getBoundaryAttachment,
getParticipantSizeConstraints = require('./BpmnSnappingUtil').getParticipantSizeConstraints, getParticipantSizeConstraints = require('./BpmnSnappingUtil').getParticipantSizeConstraints,
getLanesRoot = require('../modeling/util/LaneUtil').getLanesRoot; getLanesRoot = require('../modeling/util/LaneUtil').getLanesRoot;
var HIGH_PRIORITY = 1500;
/** /**
* BPMN specific snapping functionality * BPMN specific snapping functionality
@ -58,7 +60,7 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
} }
}); });
eventBus.on([ 'create.move', 'create.end' ], 1500, function(event) { eventBus.on([ 'create.move', 'create.end' ], HIGH_PRIORITY, function(event) {
var context = event.context, var context = event.context,
shape = context.shape, shape = context.shape,
@ -94,7 +96,7 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
'create.end', 'create.end',
'shape.move.move', 'shape.move.move',
'shape.move.end' 'shape.move.end'
], 1500, function(event) { ], HIGH_PRIORITY, function(event) {
var context = event.context, var context = event.context,
target = context.target, target = context.target,
@ -116,7 +118,7 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
'create.hover', 'create.hover',
'create.move', 'create.move',
'create.end' 'create.end'
], 1500, function(event) { ], HIGH_PRIORITY, function(event) {
var context = event.context, var context = event.context,
shape = context.shape, shape = context.shape,
hover = event.hover; hover = event.hover;
@ -217,7 +219,7 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
}); });
eventBus.on('resize.start', 1500, function(event) { eventBus.on('resize.start', HIGH_PRIORITY, function(event) {
var context = event.context, var context = event.context,
shape = context.shape; shape = context.shape;