client side zooming in Chrome

3 posts, 0 answers
  1. David
    David avatar
    10 posts
    Member since:
    Oct 2010

    Posted 12 Dec 2012 Link to this post

    I'm trying to zoom the image in on image load by doing the following, bound to OnClientLoad:

    function ZoomImage(sender, args) {
    sender.zoomBestFit();
    }

    This works fine in IE9, Firefox, and Safari, but on Chrome 23, no zooming occurs.  I have the same problem if I substitute a call to zoomImage.

    The status panel of the control *claims* to be at 25% zoom, but it visibly isn't.

    Any ideas?
  2. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 13 Dec 2012 Link to this post

    Hi David,

    Could you try to set a little timeout to the zoomBestFit() method? That fixed the problem on our side:
    function ZoomImage(sender, args) {
        setTimeout(function () {
           sender.zoomBestFit();
        }, 50)
    }

    All the best,
    Vesi
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David
    David avatar
    10 posts
    Member since:
    Oct 2010

    Posted 13 Dec 2012 Link to this post

    Thank you, setting the timeout resolved the problem for me as well.
Back to Top