Widget on single view with many renderers

Hi everyone,
I’m working on a feature to add measure widget(distance, angle, …etc) on a single view that use many renderers (the reason to use many renderers is if I split them into individual views the number of webgl context may reach the limit and cause context loss), it’s like this:

Here is what I did:

  1. Create a widget manager
  2. Add the widget to the widget manager
  3. Set the renderer of the widget manager to the base renderer of the many renderers, and during mouse move, change the render of the widget manager to the renderer of current view got by interactor.getCurrentRenderer(), interactor will change the current renderer in the mouse enter event on the containers of the many renderers

But this causes a problem, the widget is created and added by a button interaction aside and added to the current renderer immediately, and it seems to be fixed to the that renderer. When I add it to another render and do move to the other , it will not move the start handle to the other.


(handle is in renderer 4 because I move out from it last time and the renderer of interator was set to it)

I’m not sure if I should use the widget and widget manager in this situation. If it is not designed for this, I will try another way. Thanks in advance if anyone have any idea of this.

Regards