iccube set filter selection from custom widget (JS

2019-06-05 16:26发布

问题:

Using icCube 5.0, I created a custom widget using google maps, on which I draw polygons representing zones. From the JS code of this widget, I was able to update the selected items of a tree filter containing these zones as well. So that, user could select the wanted zones either by the tree filter OR the Map. Each one updating the other.

I was using the following code to do that :

Chart.prototype.producedEvents = function () {
        return [vizEventType.onSelection];
    };

self.fireEvent(vizEventType.onSelection, new viz.SetSelectionEvent(SelectedZones));

I upgraded to version 5.1.6, this is not working. Looks as 'new viz.SetSelectionEvent' is not working anymore.

回答1:

SetSelectionEvent was moved to the proper package. Try to use:

new viz.event.SetSelectionEvent(SelectedZones)