Set initial window position with AngularJS

4 posts, 0 answers
  1. Chai
    Chai avatar
    1 posts
    Member since:
    Aug 2014

    Posted 09 Sep 2014 Link to this post

    I have a problem setting the initial window position.  Here's my markup. 

    <span>
        <img id="helpIcon" src="../../../Content/images/q-mark-green-sm.png" class="{{ iconclass }}" ng-click="helpWindow.open()" alt="Help"/>
        <span id="helpWindow" class="{{dialogclass}}" kendo-window="helpWindow" k-position-left="400" k-position-top="20"
              k-title="'{{ helptitle }}'" k-on-open="helpWindowvisible = true" k-on-close="helpWindowvisible = false" style="display: none">
            {{ helptext }}
        </span>
    </span>

    Any help would be appreciated.

    Thanks,
    Chai
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 10 Sep 2014 Link to this post

    Hello Chai,

    The proper syntax is k-position="{ top: 100, left: 300 }". Here is a Dojo snippet that shows it.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Greg
    Greg avatar
    1 posts
    Member since:
    Jun 2012

    Posted 17 Aug in reply to Alex Gyoshev Link to this post

    Is the following syntax supported?

    { top: auto, left: auto, bottom: 20, right: 20 }

    It doesn't appear to work.  How would you do this?

  5. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 19 Aug Link to this post

    Hello Greg,

    I am afraid that this format is not supported, as the window uses absolute positioning and the value 'auto' does not work in that case. To make a window centered horizontally and spanning vertically, you need to calculate its size and position and set them accordingly.

    Regards,
    Alex Gyoshev
    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