Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-05-26 Thread Jackie Ng
With the 0.9 release, as part of refactoring to allow mapguide-react-layout to reuse the existing Fusion backend, I had to implement polyfills for Fusion APIs that the query/theme/redline/featureinfo/selectwithin/buffer/search widgets use. Which also meant I had to polyfill support for some

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-21 Thread Jackie Ng
Also take care that any selection handlers you register be unregistered (either manually or on page unload) as well to prevent "dangling" event handlers if you load other task pane content in from running another command. The samples page demonstrates this. - Jackie -- View this message in

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-21 Thread Jackie Ng
I've yet to implement a more generic event handler that covers most/all of the Fusion events. This is the logged issue. https://github.com/jumpinjackie/mapguide-react-layout/issues/145 - Jackie -- View this message in context:

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-21 Thread svlad
Hi, I placed this viewer in an iframe named "mapframe" and it works! var myviewer = mapframe.GetViewerInterface(); and mapframe.RegisterSelectionHandler(mySelectionHandler); That's what I wanted! Can I declare other handlers (MapLoaded etc.) without modify the viewer sources? Thanks, svlad

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-21 Thread Jackie Ng
I've just landed support so that task pane content can install/uninstall selection change event handlers. If you want to try this out right now (instead of waiting for me to release 0.9), grab the latest viewer.zip from the AppVeyor artifacts page:

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-02 Thread Jackie Ng
You raise an interesting point about how our viewer offerings are being used. Namely, I wasn't expecting embedding the viewer in a frame/iframe to feature prominently as a common use case. The viewer API design thus far has been going on the assumption that the react viewer is either the

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-02 Thread svlad
Hi, we use nearly all fusion events (MAP_LOADED, MAP_SELECTION_ON, MAP_SELECTION_OFF etc.) from outside (the fusion viewer is in an iframe). Will this be possible with the new react-layout? Thank you, svlad -- View this message in context:

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-02 Thread Jackie Ng
I've made an issue to track this: https://github.com/jumpinjackie/mapguide-react-layout/issues/144 - Jackie -- View this message in context: http://osgeo-org.1560.x6.nabble.com/react-layout-Hooking-to-events-in-the-AJAX-viewer-OnSelectionChanged-tp5309934p5310240.html Sent from the MapGuide

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-01 Thread Matze
That sound's great. I think, this is a good solution. Thank you in advanced. Matze -- View this message in context: http://osgeo-org.1560.x6.nabble.com/react-layout-Hooking-to-events-in-the-AJAX-viewer-OnSelectionChanged-tp5309934p5310235.html Sent from the MapGuide Users mailing list

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-01 Thread Jackie Ng
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

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-03-01 Thread Jackie Ng
I thought about this some more. Since your aim is to ultimately be showing some kind of URL the task pane (or new window, or frame) in response to a selection, and my aim is for this viewer to be as much configuration-driven as it possibly can be (I want custom coding to be a last resort solution

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-02-28 Thread Matze
If it is possible, yes. For what I need this: As soon as the user touches/clicks on the map and occurs a change/creation of a selection, the user will get a custum property info in the taskpane with more properties than in the mapguide propertypane. For this, I just need an event that the

Re: [mapguide-users] react-layout: Hooking to events in the AJAX viewer (OnSelectionChanged)

2017-02-28 Thread Jackie Ng
There is no current hook to the outside (of react.js) world for map selection changes. It should be trivial for me to add such a hook as a mount() call option if that is what you're after. - Jackie -- View this message in context: