Who trigger resize

4 posts, 0 answers
  1. Matjaž
    Matjaž avatar
    81 posts
    Member since:
    Jul 2015

    Posted 13 Oct Link to this post

    Resize can be trigger on multiple events:

    • expand / collapse
    • user move splitbar
    • by window if splitter is inside window and window is resized

    I need to act differently based on who trigger resize. There is expand/collapse events so this 2 events solve problems with first trigger. But what about second?

    Basically I need to know if user move splitbar. How?

  2. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 13 Oct Link to this post

    Hi Matjaž,

    The Splitter widget does not expose an API for distinguishing the window from splitbar resizing of a pane, but you can attach a handler to the window's resize event and determine which is triggered the resizing from there.

    For example, you can have a similar implementation:
    http://dojo.telerik.com/@veselinar/ekeYo


    Regards,
    Vessy
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Kendo UI is VS 2017 Ready
  4. Matjaž
    Matjaž avatar
    81 posts
    Member since:
    Jul 2015

    Posted 08 Nov Link to this post

    Can I use resizeend of splitbar? Something like this for window:

    (this.window as any).resizing._draggable.userEvents.bind("release", () => {});

     

    Splitter resize is called from .k-splitbar (which is Draggable widget). Maybe I can read dragStart and dragEnd. How?

  5. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 10 Nov Link to this post

    Hi Matjaž,

    You can get access to both the Resizable and the Draggable widgets of the Splitbar and handle their events through the resizing object of the Splitter:
    $("#splitter").getKendoSplitter().resizing._resizable.draggable.bind("dragstart", function () { console.log("draggable:: drag start") });

    You can take a look at the following sample demonstrating this approach:
    http://dojo.telerik.com/@veselinar/ekeYo

    Regards,
    Vessy
    Telerik by Progress
     
    Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
     
Back to Top
Kendo UI is VS 2017 Ready