I am using the jstree dnd plugin. To set the nodes where dropping is allowed I am using the "types" plugin and the valid_children property. This works even in between two different trees.
However I would like to prevent to drop a node on a different tree than the original one and therefore not to show the green arrow when the mouse is on a different tree.
Any solution for that ?
Actually I found a very simple solution by adding a plugin to jstree :
The 'check' function is already used by the 'DND' and 'types' plugin to define which nodes are a potential area for drop. This drives also the display of the green check or red cross. The more.is_multi allows to detect weather the target is in a different tree instance than the original instance.
Then do not forget to add this plugin to you list of plugins when creating a new jstree instance.