javascriptjqueryuser-interfacejquery-nestable

How to stop horizontal movement in jQuery Nestable?


I am using this plugin https://github.com/dbushell/Nestable

I have tried commenting various core code in it which it has helper comments like horizontal and vertical but still I am clueless on how to stop the horizontal dragging.

Let me elaborarte I only want vertical movements of elements and no horizontal movements of elements of which will lead to parent-child scenario see the pic below enter image description here


Solution

  • Well found the answer , in case any one finds a flaw then please comment

    $(element).nestable({ maxDepth: 1, });