highlight current target on DragDrop

This commit is contained in:
milan 2024-02-21 16:13:51 +01:00
parent ca78e05b6e
commit f5476ef133
3 changed files with 14 additions and 2 deletions

View File

@ -23,7 +23,7 @@ function dhtmlxTree_getNode(_tree: Et2Tree, _itemId: string)
} }
} }
export const EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT = 2000 export const EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT = 1000
export class EgwDragDropShoelaceTree { export class EgwDragDropShoelaceTree {
constructor(_tree:Et2Tree, _itemId) { constructor(_tree:Et2Tree, _itemId) {

View File

@ -175,7 +175,7 @@ export class EgwDropActionImplementation implements EgwActionImplementation {
// don't trigger dragleave if we are leaving the drag element // don't trigger dragleave if we are leaving the drag element
// don't go further if the dragged element is no there (happens when a none et2 dragged element is being dragged) // don't go further if the dragged element is no there (happens when a none et2 dragged element is being dragged)
if (!self.getTheDraggedDOM() || self.isTheDraggedDOM(this) || this == self.currentDropEl) return; if (!self.getTheDraggedDOM() || self.isTheDraggedDOM(this)) return;
const data = { const data = {
event: event, event: event,

View File

@ -161,7 +161,19 @@ export class Et2Tree extends Et2WidgetWithSelectMixin(LitElement)
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
sl-tree-item{
background-color: white;
}
sl-tree-item.drop-hover{
background-color: #0a5ca5;
}
sl-tree-item.drop-hover sl-tree-item{
background-color: white ;
}
` `
//todo bg color on drop-hover should take precedence over selected color change
] ]
} }