angular.tree icon indicating copy to clipboard operation
angular.tree copied to clipboard

how to enable drag and drop functionality with ng-tree

Open wolverine99 opened this issue 9 years ago • 0 comments

Having a hard time to find proper support for drag and drop compatible with ng-tree directive , actual model which passed in ng-tree it is not getting updated after drag and drop below is the code with dragula

<ul ng-tree="leftTree.children" ng-hide='treeLoading' data-id="{{item.id}}">            
                <li ng-show="$parent.item.expanded || !$parent.item"
                    ng-class="{active: item.id == selectedObj.id , unselectable:true} " data-id="{{item.id}}" id="item_{{item.id}}"
                     dragula-scope="$parent" dragula='"payrollRepo"'dragula-model="modelDrag"
                     select="selected()">
                    <div >
                        <i id="{{item.id}}"class="pull-left" ng-class="{'icon-gt-collapse': item.expanded && !item.leaf && !item.loading, 'icon-gt-expand': ((!item.expanded && !item.leaf) || item.showPlusIcon) && !item.loading, 'icon-spinner': item.loading, 'icon-spin': item.loading }" ng-click="toggleCollapse(item)"></i> 
                        <a id ="{{item.id}}" ng-click="getItemInfo(item)"  style="font-size:0.85em;"><i ng-class="{'icon-list-alt': item.leaf, 'icon-folder-close': !item.expanded && !item.leaf, 'icon-folder-open': item.expanded && !item.leaf }"></i> <span id ="{{item.id}}"ng-show="item.id > 0">{{item.description}}</span><span ng-show="item.id == 0">New Component</span></a>
                    </div>
                </li>
            </ul> 

Any help would be appreciated. Thank you!

wolverine99 avatar Jul 23 '16 09:07 wolverine99