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

Zoom Not Working

3 Answers 33 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
DogBizPro
Top achievements
Rank 1
DogBizPro asked on 12 Aug 2015, 05:07 PM

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.

3 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 13 Aug 2015, 01:13 PM
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
0
DogBizPro
Top achievements
Rank 1
answered on 17 Aug 2015, 06:48 PM
Great! Thank you that seems to work.
0
Vessy
Telerik team
answered on 18 Aug 2015, 02:31 PM
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
Tags
ImageEditor
Asked by
DogBizPro
Top achievements
Rank 1
Answers by
Vessy
Telerik team
DogBizPro
Top achievements
Rank 1
Share this question
or