mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-15 02:19:39 +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
|
return node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT = 2000
|
||||||
|
|
||||||
export class EgwDragDropShoelaceTree {
|
export class EgwDragDropShoelaceTree {
|
||||||
constructor(_tree:Et2Tree, _itemId) {
|
constructor(_tree:Et2Tree, _itemId) {
|
||||||
|
|
||||||
@ -36,8 +39,12 @@ export class EgwDragDropShoelaceTree {
|
|||||||
if (_event == EGW_AI_DRAG_OVER)
|
if (_event == EGW_AI_DRAG_OVER)
|
||||||
{
|
{
|
||||||
this.node.classList.add("draggedOver");
|
this.node.classList.add("draggedOver");
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.node.classList.contains("draggedOver"))
|
||||||
|
{
|
||||||
this.node.expanded = true
|
this.node.expanded = true
|
||||||
|
}
|
||||||
|
}, EXPAND_FOLDER_ON_DRAG_DROP_TIMEOUT)
|
||||||
}
|
}
|
||||||
if (_event == EGW_AI_DRAG_OUT)
|
if (_event == EGW_AI_DRAG_OUT)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user