Skip to content

Commit

Permalink
chore: remove touch interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
philippfromme committed Jan 16, 2024
1 parent eabe834 commit 672ea11
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 63 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
15 changes: 1 addition & 14 deletions lib/features/label-editing/LabelEditingProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,7 @@ export default function LabelEditingProvider(

var context = event.context,
element = context.shape,
canExecute = event.context.canExecute,
isTouch = event.isTouch;

// TODO(nikku): we need to find a way to support the
// direct editing on mobile devices; right now this will
// break for desworkflowediting on mobile devices
// as it breaks the user interaction workflow

// TODO(nikku): we should temporarily focus the edited element
// here and release the focused viewport after the direct edit
// operation is finished
if (isTouch) {
return;
}
canExecute = event.context.canExecute;

if (!canExecute) {
return;
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.

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

0 comments on commit 672ea11

Please sign in to comment.