Skip to content

Commit

Permalink
Simplify the activation/desactivation of the pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
csouchet committed Feb 14, 2023
1 parent 3ee7af6 commit 97b8fe5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions demo/draw-path/js/path-use-case.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ class PathUseCase extends UseCase {
} else if (this._state.firstSelectedShape) {
this._doActionBeforeSecondShapeSelection(currentId, (filteredPath) => {
this._highlight([filteredPath.edgeId, filteredPath.targetId]);
this._activatePointerOn(this._bpmnElementIds);
this._disablePointerOn(endEventIds);
this._activatePointerOn(this._bpmnElementIds.filter(id => !endEventIds.includes(id)));
this._state.secondSelectedShape = currentId;
this._steps.goToStep3();
});
Expand Down Expand Up @@ -112,8 +111,7 @@ class PathUseCase extends UseCase {
this._state.firstSelectedShape = filteredPath.sourceId;
}
this._highlight([filteredPath.edgeId, filteredPath.targetId]);
this._activatePointerOn(this._bpmnElementIds);
this._disablePointerOn(endEventIds);
this._activatePointerOn(this._bpmnElementIds.filter(id => !endEventIds.includes(id)));
this._state.secondSelectedShape = filteredPath.targetId;
this._steps.goToStep3();
});
Expand Down

0 comments on commit 97b8fe5

Please sign in to comment.