Add remove event listener methods
This commit is contained in:
parent
d4b68154df
commit
91675ea99c
6 changed files with 54 additions and 0 deletions
|
|
@ -74,6 +74,15 @@ export class WebSocketManager {
|
|||
this.remoteCursorsUpdateListeners.push(listener);
|
||||
}
|
||||
|
||||
public removeRemoteCursorsUpdateListener(
|
||||
listener: (cursors: ClientCursors[]) => unknown
|
||||
): void {
|
||||
const index = this.remoteCursorsUpdateListeners.indexOf(listener);
|
||||
if (index !== -1) {
|
||||
this.remoteCursorsUpdateListeners.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public start(): void {
|
||||
this.isStopped = false;
|
||||
this._isFirstSyncCompleted = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue