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

Restricting Window Positioning demo not working

3 Answers 64 Views
Window
This is a migrated thread and some comments may be shown as answers.
Seyfor
Top achievements
Rank 1
Seyfor asked on 10 Aug 2016, 08:21 AM

This demo doesn't work as expected. Window is jumping around (when dragging) and there are no restrictions.

3 Answers, 1 is accepted

Sort by
0
Accepted
Ianko
Telerik team
answered on 11 Aug 2016, 11:53 AM

Hello Matjaž,

 

Thank you for reporting that. The code in this how-to article seems to be outdated as the Kendo Window dragging functionality relies on CSS transformation now instead of the top and left properties. This is why the jumping is experienced. 

 

I will have to investigate a bit further whether this code is indeed needed and if it can be properly improved. 

 

A possible solution for this case is to handle the dragend event of the draggable utility and to apply the limits of the position there. Like in this dojo: http://dojo.telerik.com/OgIGI. I assume, however, that you can accomplish the same even with the native Kendo Window dragstart and dragend events.

 

Regards,
Ianko
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 12 Aug 2016, 05:08 AM

First: when clicking Edit this example on this page, dojo doesn't work.

On drag (onWindowDrag) restrictions doesn't work, only on dragEnd.

Maybe you should consider adding this as a base functionality since there are lots of request for this feature on UserVoice.

0
Ianko
Telerik team
answered on 12 Aug 2016, 05:42 AM

Hello Matjaž,

I am not sure how the basic usage demo is related to the case discussed here. However, the Kendo WIndow won't open because the initial frame's view port is smaller. You can enlarge the right pane for the Kendo Window to show up. Or clone the dojo and open it in fullscreen. 

As for the demo I provided, yes, this is how this code could work for the time being—reseting Kendo WIndow position on dragend. This is why I mentioned that you can possibly achieve the same by using the dragstart and dragend events. Although, using the the drag event of the draggable utility will enable you to persist the position all the time. 

As for the UserVoice item, as you can see, it is currently under review. Therefore, there is no firm estimation currently whether this feature will be included or not. Any further details on that will be available in the item linked. If, however, there is valuable information regarding the enhancement request there you would like to share with us, please feel free to post a comment there so that the dev team and our PM to be able to consider it during the request evaluation.

Regards,
Ianko
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Window
Asked by
Seyfor
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Seyfor
Top achievements
Rank 1
Share this question
or