Custom drag clue event

7 posts, 0 answers
  1. William
    William avatar
    4 posts
    Member since:
    Jan 2015

    Posted 24 Feb 2015 Link to this post

    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
  2. William
    William avatar
    4 posts
    Member since:
    Jan 2015

    Posted 24 Feb 2015 Link to this post

    Sorry the title is wrong, is drop hint not drag clue
  3. Kendo UI is VS 2017 Ready
  4. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 26 Feb 2015 Link to this post

    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!
     
  5. William
    William avatar
    4 posts
    Member since:
    Jan 2015

    Posted 26 Feb 2015 in reply to Alexander Popov Link to this post

    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
  6. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 02 Mar 2015 Link to this post

    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!
     
  7. William
    William avatar
    4 posts
    Member since:
    Jan 2015

    Posted 04 Mar 2015 in reply to Alexander Popov Link to this post

    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
  8. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 06 Mar 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready