mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
adding delay of 2sec to expand folder on DragDrop
-- regarding Ticket: 91581
This commit is contained in:
parent
1c608ac6a5
commit
d1e8a702c0
@ -22,6 +22,9 @@ function dhtmlxTree_getNode(_tree: Et2Tree, _itemId: string)
|
||||
return node
|
||||
}
|
||||
}
|
||||
|
||||
export const EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT = 2000
|
||||
|
||||
export class EgwDragDropShoelaceTree {
|
||||
constructor(_tree:Et2Tree, _itemId) {
|
||||
|
||||
@ -36,8 +39,12 @@ export class EgwDragDropShoelaceTree {
|
||||
if (_event == EGW_AI_DRAG_OVER)
|
||||
{
|
||||
this.node.classList.add("draggedOver");
|
||||
setTimeout(() => {
|
||||
if (this.node.classList.contains("draggedOver"))
|
||||
{
|
||||
this.node.expanded = true
|
||||
|
||||
}
|
||||
}, EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT)
|
||||
}
|
||||
if (_event == EGW_AI_DRAG_OUT)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user