GoalModelEditor/FrontEnd/public/js/projectEdit/projectEdit.js
/**
 * if "dd-empty" is more than one in the cluster, remove one
 * to make sure there is at most one "dd-empty" cluster
 */
if "dd-empty" is more than one in the cluster, remove one
to make sure there is at most one "dd-empty" cluster
if " dd - empty " is more than one in the cluster remove one to make sure there is at most one " dd - empty " cluster
function removeCluster() {
    if ($(".dd-empty").length > 1) {
        $(".dd-empty").parent()[1].remove();
        $(".dd").nestable({
            onDragStart: function (l, e) {
                addNoChildrenClass();
            },
            callback: function (l, e) {
                removeCluster();
            },
            scroll: true
        });
    }
}
function removeCluster ( ) { if ( $ ( ".dd-empty" ) . length > 1 ) { $ ( ".dd-empty" ) . parent ( ) [ 1 ] . remove ( ) ; $ ( ".dd" ) . nestable ( { onDragStart : function ( l , e ) { addNoChildrenClass ( ) ; } , callback : function ( l , e ) { removeCluster ( ) ; } , scroll : true } ) ; } }
if "dd-empty" is more than one in the cluster, remove one
 to make sure there is at most one "dd-empty" cluster
if " dd - empty " is more than one in the cluster remove one to make sure there is at most one " dd - empty " cluster
//activate nestable2 function // get type of dragged element // let type = $(e).children(".dd-handle").attr("class").split(" ")[0]; // console.log(type); //when start dragging, trigger addNoChildrenClass method // l is the main container // e is the element that was moved //when finish dropping, trigger these methods to make "dd-empty" is always one //enable auto scrolling method while dragging