Zoom Not Working

4 posts, 0 answers
  1. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 12 Aug 2015 Link to this post

    I want to zoom out the image since it is so large you can only see a small portion of it. I found this code to use.

     

        <script type="text/javascript">
            function OnClientLoad(sender) {
                //sender.zoomImage(50);
                sender.zoomBestFit();
            }
        </script>

     

    Neither 'zooms' work. They both skew the image to the wrong proportions. How do you do exactly what the zoom out toolbar button does? That works fine.

  2. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 13 Aug 2015 Link to this post

    Hello Stephanie,

    The experienced problem is most probably due to the fact that the ClientLoad event of RadImageEditor is too early and the image is not fully loaded. I would advice that you attach a handler to the OnClientImageLoad event instead and zoom the image in it:
    <telerik:RadImageEditor ID="RadImageEditor1" runat="server" ImageUrl="~/Images/metaData.JPG" OnClientImageLoad="onClientImageLoad">
    </telerik:RadImageEditor>
    <script>
        function onClientImageLoad(sender) {
            //sender.zoomImage(50);
            sender.zoomBestFit();
        }
    </script>


    Regards,
    Vessy
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stephanie
    Stephanie avatar
    139 posts
    Member since:
    Aug 2013

    Posted 17 Aug 2015 in reply to Vessy Link to this post

    Great! Thank you that seems to work.
  5. Vessy
    Admin
    Vessy avatar
    1380 posts

    Posted 18 Aug 2015 Link to this post

    Hi,

    You are welcome, Stephanie. Let us know in case you need any further assistance on this matter.

    Regards,
    Vessy
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top