Skip to content

Commit

Permalink
Revert "fix: pass context to eventHelpers"
Browse files Browse the repository at this point in the history
This reverts commit 7df3d66.
  • Loading branch information
ozyx committed May 7, 2024
1 parent c323b5b commit e12ea9c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/plugins/imagery/lib/eventHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const helperFunctions = {
} else if (object.addEventListener) {
object.addEventListener(event, listener._cb);
} else {
object.on(event, listener._cb, listener.context);
object.on(event, listener._cb);
}

this._listeningTo.push(listener);
Expand Down Expand Up @@ -78,7 +78,7 @@ const helperFunctions = {
} else if (listener.object.removeEventListener) {
listener.object.removeEventListener(listener.event, listener._cb);
} else {
listener.object.off(listener.event, listener._cb, listener.context);
listener.object.off(listener.event, listener._cb);
}

return listener;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/plot/lib/eventHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const helperFunctions = {
} else if (listener.object.removeEventListener) {
listener.object.removeEventListener(listener.event, listener._cb);
} else {
listener.object.off(listener.event, listener._cb, listener.context);
listener.object.off(listener.event, listener._cb);
}

return listener;
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/summaryWidget/src/eventHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const helperFunctions = {
} else if (object.addEventListener) {
object.addEventListener(event, listener._cb);
} else {
object.on(event, listener._cb, listener.context);
object.on(event, listener._cb);
}

this._listeningTo.push(listener);
Expand Down Expand Up @@ -78,7 +78,7 @@ const helperFunctions = {
} else if (listener.object.removeEventListener) {
listener.object.removeEventListener(listener.event, listener._cb);
} else {
listener.object.off(listener.event, listener._cb, listener.context);
listener.object.off(listener.event, listener._cb);
}

return listener;
Expand Down

0 comments on commit e12ea9c

Please sign in to comment.