unregisterEventByUserId
Remove registered callback for a specific user id
Parameters
Name | Type | Description |
---|---|---|
userId | string | user id to remove all callback |
Example
When you register to an event, you can pass a custom id for grouping listener. For exemple you can write this:
x
FnoMapManager.registerEvent("mouseClickContainer", (data) => {
console.log("container clicked"):
}, 'group1');//'group1' is a custom user id
FnoMapManager.registerEvent("mouseOverContainer", (data) => {
console.log("container overed"):
}, 'group1');
You can remove the 2 events using the user id "group1
":
FnoMapManager.unregisterEventByUserId('group1');