Ctesius.registerEvent with the event name and a callback function, which can optionally take n arguments:
Events can also be triggered by ‘kicking’:
If you want plug in to the toggle system (grid view, list view, etc), the following events will be kicked when appropriate:
The following events will trigger when there is an action on a map.
When various help texts are displayed on a drawable map the following actions may be kicked:
When a map state has been changed and new properties should be fetched:
Called before a Draggable (or drawn) map is updated with fresh properties called from the server. Useful for showing ‘updating map’ style page statuses.
Called when results have been returned from a draggable map update. Returns the raw response from the server. The map has not yet been updated with new pins.
Called when a map marker has been rendered for the given property.
When interacting with a map:
Called when a map marker’s popup section has been opened.
Called whenever a map has been rendered.
Some actions, like a redrawing of a polygon, may require a reloading of the page if a tab is switched. This event is kicked just before that happens, giving time for the page to show a ‘loading’ style alert.
The following events will be kicked when a saved property is added or removed. The
by_action events signify that the user has saved a property where it was not previously saved - these events are useful for displaying a flash message or a subtle animation. Without the
by_action, the event should be used to decorate saved properties or remove descorating. For instance, changing text from ‘Save property’ to ‘Remove property’:
The following methods will be called if a saved properties list is rendered:
Saved searches work in a similar way to saved properties:
Called before validation on a user, when data is submitted using the action.
Called before the system will display a flash notification (#/flash/some-notification):
Called before validation search form data.