Skip to content

Commit 6452e9f

Browse files
miyuescbarmac
authored andcommitted
fix: Duplicate event listener functions
1 parent a706f6b commit 6452e9f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/features/toggle-mode/viewer/ToggleMode.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,6 @@ export default function ToggleMode(eventBus, canvas, selection) {
2020

2121
this._active = false;
2222

23-
eventBus.on('import.parse.start', () => {
24-
25-
if (this._active) {
26-
this.toggleMode(false);
27-
28-
eventBus.once('import.done', () => {
29-
this.toggleMode(true);
30-
});
31-
}
32-
});
33-
3423
eventBus.on('diagram.init', () => {
3524
this._canvasParent = this._canvas.getContainer().parentNode;
3625

@@ -83,4 +72,4 @@ ToggleMode.prototype.toggleMode = function(active = !this._active) {
8372
this._active = active;
8473
};
8574

86-
ToggleMode.$inject = [ 'eventBus', 'canvas' ];
75+
ToggleMode.$inject = [ 'eventBus', 'canvas' ];

0 commit comments

Comments
 (0)