chore(modeling/behavior): rename Create -> FixHover behavior

This commit is contained in:
Nico Rehwaldt 2019-06-14 11:15:01 +02:00 committed by merge-me[bot]
parent bef75b2435
commit 5a69f9c0bc
4 changed files with 9 additions and 8 deletions

View File

@ -7,12 +7,13 @@ import { isAny } from '../util/ModelingUtil';
var HIGH_PRIORITY = 1500; 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 {ElementRegistry} elementRegistry
* @param {EventBus} eventBus * @param {EventBus} eventBus
*/ */
export default function CreateBehavior(elementRegistry, eventBus) { export default function FixHoverBehavior(elementRegistry, eventBus) {
eventBus.on([ eventBus.on([
'create.hover', 'create.hover',
'create.move', 'create.move',
@ -32,7 +33,7 @@ export default function CreateBehavior(elementRegistry, eventBus) {
}); });
} }
CreateBehavior.$inject = [ FixHoverBehavior.$inject = [
'elementRegistry', 'elementRegistry',
'eventBus' 'eventBus'
]; ];

View File

@ -3,7 +3,7 @@ import AppendBehavior from './AppendBehavior';
import AttachEventBehavior from './AttachEventBehavior'; import AttachEventBehavior from './AttachEventBehavior';
import BoundaryEventBehavior from './BoundaryEventBehavior'; import BoundaryEventBehavior from './BoundaryEventBehavior';
import CopyPasteBehavior from './CopyPasteBehavior'; import CopyPasteBehavior from './CopyPasteBehavior';
import CreateBehavior from './CreateBehavior'; import FixHoverBehavior from './FixHoverBehavior';
import CreateBoundaryEventBehavior from './CreateBoundaryEventBehavior'; import CreateBoundaryEventBehavior from './CreateBoundaryEventBehavior';
import CreateDataObjectBehavior from './CreateDataObjectBehavior'; import CreateDataObjectBehavior from './CreateDataObjectBehavior';
import CreateParticipantBehavior from './CreateParticipantBehavior'; import CreateParticipantBehavior from './CreateParticipantBehavior';
@ -37,7 +37,7 @@ export default {
'attachEventBehavior', 'attachEventBehavior',
'boundaryEventBehavior', 'boundaryEventBehavior',
'copyPasteBehavior', 'copyPasteBehavior',
'createBehavior', 'fixHoverBehavior',
'createBoundaryEventBehavior', 'createBoundaryEventBehavior',
'createDataObjectBehavior', 'createDataObjectBehavior',
'createParticipantBehavior', 'createParticipantBehavior',
@ -69,7 +69,7 @@ export default {
attachEventBehavior: [ 'type', AttachEventBehavior ], attachEventBehavior: [ 'type', AttachEventBehavior ],
boundaryEventBehavior: [ 'type', BoundaryEventBehavior ], boundaryEventBehavior: [ 'type', BoundaryEventBehavior ],
copyPasteBehavior: [ 'type', CopyPasteBehavior ], copyPasteBehavior: [ 'type', CopyPasteBehavior ],
createBehavior: [ 'type', CreateBehavior ], fixHoverBehavior: [ 'type', FixHoverBehavior ],
createBoundaryEventBehavior: [ 'type', CreateBoundaryEventBehavior ], createBoundaryEventBehavior: [ 'type', CreateBoundaryEventBehavior ],
createDataObjectBehavior: [ 'type', CreateDataObjectBehavior ], createDataObjectBehavior: [ 'type', CreateDataObjectBehavior ],
createParticipantBehavior: [ 'type', CreateParticipantBehavior ], createParticipantBehavior: [ 'type', CreateParticipantBehavior ],

View File

@ -11,7 +11,7 @@ import moveModule from 'diagram-js/lib/features/move';
import { createCanvasEvent as canvasEvent } from '../../../../util/MockEvents'; import { createCanvasEvent as canvasEvent } from '../../../../util/MockEvents';
describe('features/modeling/behavior - create', function() { describe('features/modeling/behavior - fix hover', function() {
var testModules = [ var testModules = [
coreModule, coreModule,
@ -20,7 +20,7 @@ describe('features/modeling/behavior - create', function() {
modelingModule modelingModule
]; ];
var diagramXML = require('./CreateBehavior.participant.bpmn'); var diagramXML = require('./FixHoverBehavior.participant.bpmn');
beforeEach(bootstrapModeler(diagramXML, { beforeEach(bootstrapModeler(diagramXML, {
modules: testModules modules: testModules