[mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)
Jackie Ng
jumpinjackie at gmail.com
Wed Mar 1 07:32:51 PST 2017
Thanks for the link, it makes it more clear what you're trying to achieve.
I think the easiest thing is for me to add a new viewer API to register a
handler for selection changes. It will be at the same level as other AJAX
viewer APIs, so you can get to it from the task pane content through
parent.parent
So your task pane content just needs a script block that is basically
window.onload = function() {
parent.parent.RegisterSelectionChangeHandler(function(selection) {
//Selection changed, update your task pane content here
});
};
The key is that you can do this from "inside" the viewer from the task pane
content, and not invasively from "outside" the viewer through a mount
parameter or custom pre-mounting code.
How does this sound?
- Jackie
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/react-layout-Hooking-to-events-in-the-AJAX-viewer-OnSelectionChanged-tp5309934p5310155.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list