/*To hide the sibling shown while performing drag and drop*/
/*custom is a cssClass for TreeView*/
.custom .e-sibling {
display: none !important;
} |
.e-treeview.custom.e-drag-item {
background-color: transparent;
}
.e-treeview.custom.e-drag-item .e-icons.e-drop-out::before, .e-treeview.custom.e-drag-item .e-icons.e-drop-in::before, .e-treeview.custom.e-drag-item .e-icons.e-drop-next::before {
content: '';
} |
/* Triggers when a node is rendered */
NodeDrawn(args) {
var Expandicon = args.node.querySelector('.e-icons.e-icon-expandable');
var Collapseicon = args.node.querySelector('.e-icons.e-icon-collpasible');
if (!(Expandicon || Collapseicon)) {
args.node.classList.add('e-custom');
}
}
/* To remove the icon padding */
.e-treeview .e-custom .e-text-content > .e-list-text {
margin-left: -25px;
} |
/*Triggers when a node drag stop */
NodeDragStop(args) {
if (args.droppedNode.classList.contains('e-custom') && args.dropIndicator == "e-drop-in") {
args.droppedNode.classList.remove('e-custom');
if (!(args.draggedNode.querySelector('.e-icons')))
args.draggedNode.classList.add('e-custom');
}
} |
/*Triggers when a node dropped successfully */
NodeDropped(args){
if (!(args.draggedParentNode.querySelector('.e-icons')))
args.draggedParentNode.classList.add('e-custom');
}
} |