title: dnd, how to restrict dropping to certain node types?
body: <p>I have 37 different node types.
  I am trying to implement drag and drop.
  This works but I need to restrict exactly which types can be dragged and where they can be dropped.
  I can't find any useful information in the docs unfortunately (http://www.jstree.com/documentation).</p>
  
  <p>So far I have tried three methods:</p>
  
  <p>first: defining return values of true or false in the drag_check callback depending on the node type:</p>
  
  <pre><code>$("#demo1").jstree({
      "dnd" : {
          "drag_check" : function () {
  </code></pre>
  
  <p>second: binding to the prepare_move.jstree event and returning true or false values depending on the node type:</p>
  
  <pre><code>.bind("prepare_move.jstree", function (e, data) {
     if (data.rslt.o.attr("typ") === "tpop") {
  </code></pre>
  
  <p>third: using the types plugin and defining valid children there:</p>
  
  <pre><code>$("#tree").jstree( {
      "types": {
          "type_attr": "typ",
          "valid_children": ["ap_ordner_pop", "ap_ordner_apziel", "ap_ordner_erfkrit", "ap_ordner_apber", "ap_ordner_ber", "ap_ordner_beob", "iballg", "ap_ordner_ibb", "ap_ordner_ibartenassoz"],
          "types": {
          "ap_ordner_pop": {
              "valid_children": "pop"
          },
          "pop": {
              "valid_children": ["pop_ordner_tpop", "pop_ordner_popber", "pop_ordner_massnber"],
              "new_node": "neue Population"
          },
          "pop_ordner_tpop": {
              "valid_children": "tpop"
          }
  </code></pre>
  
  <p>But I can still drop most nodes nearly anywhere.
  How must this be done?
  Or can you point me to a good example?</p>
  
  <p>Help is much appreciated.</p>