iccube set filter selection from custom widget (JS)

梦想与她 提交于 2019-12-08 05:34:08

问题


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)


来源:https://stackoverflow.com/questions/34812708/iccube-set-filter-selection-from-custom-widget-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!