Find & Order
v1.0
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
unregisterEventByName
Copy Markdown
Open in ChatGPT
Open in Claude
Remove registered callback for a specific event name.
Parameters
| Name | Type | Description |
|---|---|---|
| event | string | Name of the event to unregister. see all events |
Example
You can attach as many function as you want to an event. For example, you can attach a callback to event "mouseClickContainer" in the load method.
Javascript
FnoMapManager.loadMap(idMap, '3dMapContainer', function(){ FnoMapManager.registerEvent("mouseClickContainer", (data) => { console.log("Container clicked from loadMap method") });})On other component you want to show the name of the current selected container, you can attach function to "mouseClickContainer" again and get the name when container changed.
Javascript
function RegisterContainerNameWhenClicked(){ FnoMapManager.registerEvent("mouseClickContainer", (data) => { console.log("Container name:", data.container.name); });}Now, if you trigger "mouseClickContainer" event by clicking on an container in the 3D map, you will see this 2 rows in the console:
Container clicked from loadMap methodContainer name: ABCDE
If you want to remove these 2 listeners, simply call unregisterEventByName method with the name of the event
Javascript
FnoMapManager.unregisterEventByName("mouseClickContainer");Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Next to read:
unregisterEventByUserIdDiscard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message
