Restricting Window Positioning demo not working

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

    Posted 10 Aug Link to this post

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

  2. Answer
    Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 11 Aug Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
  4. Matjaž
    Matjaž avatar
    81 posts
    Member since:
    Jul 2015

    Posted 12 Aug in reply to Ianko Link to this post

    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.

  5. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 12 Aug Link to this post

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