Skip to content

Commit

Permalink
feat: remove touch interaction module
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Migrated to `diagram-js@14` which removes touch interaction module, and dependency on unsupported `hammerjs` package. If you rely on touch interaction, you need to support touch interaction on your own.

deps: update to `diagram-js@14`

feat: allow to add to selection via lasso tool

Closes #2053
  • Loading branch information
barmac committed Feb 6, 2024
1 parent b786749 commit 9b2b6a6
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 76 deletions.
2 changes: 0 additions & 2 deletions lib/Modeler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import NavigatedViewer from './NavigatedViewer';

import KeyboardMoveModule from 'diagram-js/lib/navigation/keyboard-move';
import MoveCanvasModule from 'diagram-js/lib/navigation/movecanvas';
import TouchModule from 'diagram-js/lib/navigation/touch';
import ZoomScrollModule from 'diagram-js/lib/navigation/zoomscroll';

import AlignElementsModule from './features/align-elements';
Expand Down Expand Up @@ -156,7 +155,6 @@ Modeler.prototype._interactionModules = [
// non-modeling components
KeyboardMoveModule,
MoveCanvasModule,
TouchModule,
ZoomScrollModule
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ inherits(DataInputAssociationBehavior, CommandInterceptor);

/**
* Only call the given function when the event
* touches a bpmn:DataInputAssociation.
* changes a bpmn:DataInputAssociation.
*
* @param {Function} fn
* @return {Function}
Expand Down
29 changes: 7 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
},
"dependencies": {
"bpmn-moddle": "^8.1.0",
"diagram-js": "^13.4.0",
"diagram-js": "^14.0.0",
"diagram-js-direct-editing": "^2.1.1",
"ids": "^1.0.5",
"inherits-browser": "^0.1.0",
Expand Down
5 changes: 2 additions & 3 deletions test/integration/CustomElementsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ import {

import customElementsModules from './custom-elements';

var noTouchInteractionModule = { touchInteractionEvents: [ 'value', null ] },
modelerModules = Modeler.prototype._modules,
customModules = [ customElementsModules, noTouchInteractionModule ];
var modelerModules = Modeler.prototype._modules,
customModules = [ customElementsModules ];

var testModules = [].concat(modelerModules, customModules);

Expand Down
41 changes: 0 additions & 41 deletions test/spec/features/label-editing/TouchIntegrationSpec.js

This file was deleted.

2 changes: 1 addition & 1 deletion test/spec/features/modeling/LabelBoundsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ describe('label bounds', function() {
});


it('should not update DI of untouched labels', function() {
it('should not update DI of unchanged labels', function() {

var xml = require('./LabelBoundsSpec.simple.bpmn');

Expand Down
2 changes: 1 addition & 1 deletion test/spec/features/modeling/UpdatePropertiesSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('features/modeling - update properties', function() {
}));


it('should keep unchanged default flow untouched', inject(
it('should keep unchanged default flow intact', inject(
function(elementRegistry, modeling) {

// given
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import coreModule from 'lib/core';
import moveModule from 'diagram-js/lib/features/move';
import modelingModule from 'lib/features/modeling';

var noTouchInteractionModule = { touchInteractionEvents: [ 'value', null ] };

import {
createCanvasEvent as canvasEvent
} from '../../../../util/MockEvents';
Expand All @@ -26,7 +24,6 @@ describe('modeling/behavior - drop on connection', function() {

beforeEach(bootstrapModeler(diagramXML, {
modules: [
noTouchInteractionModule,
moveModule,
modelingModule,
coreModule
Expand Down
2 changes: 1 addition & 1 deletion test/spec/features/modeling/layout/LayoutConnectionSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('features/modeling - layout connection', function() {
}));


describe('should not touch already layouted', function() {
describe('should not change already layouted', function() {

it('execute', inject(function(elementRegistry, modeling, bpmnFactory) {

Expand Down

0 comments on commit 9b2b6a6

Please sign in to comment.