Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Topicmaps: client-side viewmodel customizer (#505)
Nomenclature change: The concept of "Topicmap Renderer Customizer" is renamed to "View Customizer". In correspondence to "Viewmodel Customizer". Viewmodel Customizers also have a client-side part now. At client-side a plugin can register a Viewmodel Customizer at the Canvas Renderer: {{{ canvas_renderer.add_viewmodel_customizer(customizer_func) }}} A (client-side) Viewmodel Customizer is a constructor function with 1 method: {{{ modify_view_properties(topic, view_props) }}} The Canvas Renderer calls this method each time a topic is added to a topicmap. The customizer then have the opportunity to add custom view properties to the "view_props" object. Typically these custom view properties are accessed then by a compatible View Customizer to do custom rendering. As an example see the Box Renderer plugin: https://github.com/jri/dm4-box-renderer Note: for the moment a Viewmodel Customizer is only applicable to the Canvas Renderer (and its default TopicmapViewmodel), not to the Geomap Renderer. BREAKING CHANGES CanvasRenderer: - add_view_customizer() replaces add_customizer() - add_viewmodel_customizer() is new method See #505.
- Loading branch information
Showing
5 changed files
with
47 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters