This is a migrated thread and some comments may be shown as answers.

Custom drag clue event

6 Answers 112 Views
Drag and Drop
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 24 Feb 2015, 09:15 PM
Hi,

I am using kendo tree with drag and drop enabled, is there any way to create my own k-drop-hint event or disable it?

Thanks
William

6 Answers, 1 is accepted

Sort by
0
William
Top achievements
Rank 1
answered on 24 Feb 2015, 09:17 PM
Sorry the title is wrong, is drop hint not drag clue
0
Alexander Popov
Telerik team
answered on 26 Feb 2015, 04:35 PM
Hi William,

I am not sure I understand what exactly you wish to achieve. Would you please elaborate what the expected behavior is?

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
William
Top achievements
Rank 1
answered on 26 Feb 2015, 10:25 PM
Hi Alexander,

I want to append <div class='k-drop-hint' /> to all the tree nodes after loading the data source and set them to visibility:hide
and when we need to display the hint, set it to visibility:visible instead of append <div class='k-drop-hint' /> every time when user dragging the item.

Regards,
William
0
Alexander Popov
Telerik team
answered on 02 Mar 2015, 03:28 PM
Hello William,

I am afraid that preventing the drop hint from being appended is not supported. What would be the purpose of adding the drop hint manually though? Perhaps we can suggest a different approach.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
William
Top achievements
Rank 1
answered on 05 Mar 2015, 04:01 AM
Hi Alexander,

I think there is a performance issue when we dragging item inside a big tree (eg. 2000 tree nodes or more)
Every time it append drop hint will trigger the browser to reflow/relayout and repaint the page, so I am thinking to just append all the drop hint at the beginning and set it to hide.
By changing the visibility, it will only trigger browser's repaint which means better performance.

Sorry for my bad English.
Regards,
William
0
Alexander Popov
Telerik team
answered on 06 Mar 2015, 01:48 PM
Hi William,

Adding and removing a single DOM element is relatively cheap operation that should not affect the performance. Adding another 2000 DOM elements (one for each TreeView node) on the other hand, will definitely increase both the time required to render the TreeView and the overall memory consumption of the page.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Drag and Drop
Asked by
William
Top achievements
Rank 1
Answers by
William
Top achievements
Rank 1
Alexander Popov
Telerik team
Share this question
or