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

Who trigger resize

3 Answers 328 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Seyfor
Top achievements
Rank 1
Seyfor asked on 13 Oct 2016, 10:27 AM

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?

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 13 Oct 2016, 02:17 PM
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.
 
0
Seyfor
Top achievements
Rank 1
answered on 08 Nov 2016, 02:47 PM

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?

0
Vessy
Telerik team
answered on 10 Nov 2016, 02:46 PM
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.
 
Tags
Splitter
Asked by
Seyfor
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Seyfor
Top achievements
Rank 1
Share this question
or