Thank you for your quick response. After sending my message, I tried some things and ended implementing what was your suggestion #2 and it seems to work.
I was not aware of the AbstractInteractionPolicy#isRegistered API and may be able to use it in the future.
Thanks again! :)
there are two possible solutions to your problem:
1) You can use the AbstractInteractionPolicy#isRegistered(EventTarget) and #isRegisteredForHost(EventTarget) methods to guard interaction policies from performing changes when another interaction policy is adapted to the part that is registered as the controller for the event target. This can be tested when the interaction policy is initialized (i.e. startDrag(), startScroll(), etc. is called). Then, you can set a flag "invalid" if the policy should not perform changes, e.g. "if (!isRegisteredForHost(event.getTarget())) invalid = true; else invalid = false; if (invalid) return;". The test "if (invalid) return;" can be included in all other callback methods. This is the approach implemented by the default policies.
2) You can replace the DefaultTargetPolicyResolver and provide an implementation that better matches your use case, e.g. return only the "closest" policy that can be found. This is also the recommended approach, if you want to exclude visuals from triggering interaction policies.
gef-dev mailing listgef-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit