diff --git a/lib/features/modeling/behavior/CreateBehavior.js b/lib/features/modeling/behavior/FixHoverBehavior.js similarity index 76% rename from lib/features/modeling/behavior/CreateBehavior.js rename to lib/features/modeling/behavior/FixHoverBehavior.js index e6670490..39219699 100644 --- a/lib/features/modeling/behavior/CreateBehavior.js +++ b/lib/features/modeling/behavior/FixHoverBehavior.js @@ -7,12 +7,13 @@ import { isAny } from '../util/ModelingUtil'; var HIGH_PRIORITY = 1500; /** - * Ensure hovering participant during create and move. + * Ensure we correct hover targets to improve diagram interaction + * during create and move. * * @param {ElementRegistry} elementRegistry * @param {EventBus} eventBus */ -export default function CreateBehavior(elementRegistry, eventBus) { +export default function FixHoverBehavior(elementRegistry, eventBus) { eventBus.on([ 'create.hover', 'create.move', @@ -32,7 +33,7 @@ export default function CreateBehavior(elementRegistry, eventBus) { }); } -CreateBehavior.$inject = [ +FixHoverBehavior.$inject = [ 'elementRegistry', 'eventBus' ]; \ No newline at end of file diff --git a/lib/features/modeling/behavior/index.js b/lib/features/modeling/behavior/index.js index 8c23c62b..c5ed686d 100644 --- a/lib/features/modeling/behavior/index.js +++ b/lib/features/modeling/behavior/index.js @@ -3,7 +3,7 @@ import AppendBehavior from './AppendBehavior'; import AttachEventBehavior from './AttachEventBehavior'; import BoundaryEventBehavior from './BoundaryEventBehavior'; import CopyPasteBehavior from './CopyPasteBehavior'; -import CreateBehavior from './CreateBehavior'; +import FixHoverBehavior from './FixHoverBehavior'; import CreateBoundaryEventBehavior from './CreateBoundaryEventBehavior'; import CreateDataObjectBehavior from './CreateDataObjectBehavior'; import CreateParticipantBehavior from './CreateParticipantBehavior'; @@ -37,7 +37,7 @@ export default { 'attachEventBehavior', 'boundaryEventBehavior', 'copyPasteBehavior', - 'createBehavior', + 'fixHoverBehavior', 'createBoundaryEventBehavior', 'createDataObjectBehavior', 'createParticipantBehavior', @@ -69,7 +69,7 @@ export default { attachEventBehavior: [ 'type', AttachEventBehavior ], boundaryEventBehavior: [ 'type', BoundaryEventBehavior ], copyPasteBehavior: [ 'type', CopyPasteBehavior ], - createBehavior: [ 'type', CreateBehavior ], + fixHoverBehavior: [ 'type', FixHoverBehavior ], createBoundaryEventBehavior: [ 'type', CreateBoundaryEventBehavior ], createDataObjectBehavior: [ 'type', CreateDataObjectBehavior ], createParticipantBehavior: [ 'type', CreateParticipantBehavior ], diff --git a/test/spec/features/modeling/behavior/CreateBehavior.participant.bpmn b/test/spec/features/modeling/behavior/FixHoverBehavior.participant.bpmn similarity index 100% rename from test/spec/features/modeling/behavior/CreateBehavior.participant.bpmn rename to test/spec/features/modeling/behavior/FixHoverBehavior.participant.bpmn diff --git a/test/spec/features/modeling/behavior/CreateBehaviorSpec.js b/test/spec/features/modeling/behavior/FixHoverBehaviorSpec.js similarity index 89% rename from test/spec/features/modeling/behavior/CreateBehaviorSpec.js rename to test/spec/features/modeling/behavior/FixHoverBehaviorSpec.js index 2576778d..f1469d5e 100644 --- a/test/spec/features/modeling/behavior/CreateBehaviorSpec.js +++ b/test/spec/features/modeling/behavior/FixHoverBehaviorSpec.js @@ -11,7 +11,7 @@ import moveModule from 'diagram-js/lib/features/move'; import { createCanvasEvent as canvasEvent } from '../../../../util/MockEvents'; -describe('features/modeling/behavior - create', function() { +describe('features/modeling/behavior - fix hover', function() { var testModules = [ coreModule, @@ -20,7 +20,7 @@ describe('features/modeling/behavior - create', function() { modelingModule ]; - var diagramXML = require('./CreateBehavior.participant.bpmn'); + var diagramXML = require('./FixHoverBehavior.participant.bpmn'); beforeEach(bootstrapModeler(diagramXML, { modules: testModules