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

how to zoom the image in reset function of image editor.

5 Answers 224 Views
ImageEditor
This is a migrated thread and some comments may be shown as answers.
Chintha
Top achievements
Rank 1
Chintha asked on 27 Nov 2012, 06:11 AM
By using this code image is not zoom as per provided value.But in image editor zoom value displayed as 40.
how can i zoom the image on reset function using java script.
I used this below code:

script:
function OnClientCommandExecuted(imageEditor, args) {
if (args.get_commandName() == "Reset") {
            imageEditor._zoomImage(40);
  }
}
Aspx:
  <telerik:RadImageEditor ID="rieControl" runat="server"
                        OnClientLoad="OnClientLoad" OnClientCommandExecuted="OnClientCommandExecuted">
  </telerik:RadImageEditor>

5 Answers, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 27 Nov 2012, 04:53 PM
Hi Chintha,

I managed to reproduce the described issue by setting the CanvasMode of the ImageEditor to "No" and it turns to be a bug in RadImageEditor. I have logged it into our PIT system, so you could track its progress in here: PITS.

As a small token of our gratitude for your efforts I have updated your Telerik points.

The only workaround I could suggest you for now is to use the default CanvasMode of ImageEditor or to set it to "Yes". Additionally, I want to kindly recommend you to use the public methods of the ImageEditor whenever it is possible, e.g the zoomImage(40) instead of _zoomImage(40).

Regards,
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.
0
Chintha
Top achievements
Rank 1
answered on 28 Nov 2012, 07:08 AM
Hi,

Actually we are using Telerik product version: 2012.1.215.40. 
 'CanvasMode' property is not available in this version.
By using zoomImage() method also not getting desired result.Only zoom level is changing, but not update UI as per zoom level.
Any suggestions for this problems.
0
Vessy
Telerik team
answered on 30 Nov 2012, 11:57 AM
Hi Chintha,

It turn out that a there is some additional time needed for the ImageEditor to apply the zoom level on the image, thus a little timeout will fix the issue:
function OnClientCommandExecuted(imageEditor, args) {
    if (args.get_commandName() == "Reset") {
        setTimeout(function myfunction() {
            imageEditor.zoomImage(40);
        }, 50)
    }
}

Kind regards,
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.
0
Chintha
Top achievements
Rank 1
answered on 30 Nov 2012, 12:35 PM
Yes, it is working.
Thanks for the help.
0
Arron
Top achievements
Rank 1
answered on 21 Aug 2013, 09:54 AM
I am glad to see that your probelm had been solved already. But I am almost a green hand on the image processing program. I have only tried  the free trial package of an image and document processing tool to scale images and do each step according to its tutorials about how to scale images using C#.NET. I want to know the difference between them. Thanks in advance.



Best regards,
Arron
Tags
ImageEditor
Asked by
Chintha
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Chintha
Top achievements
Rank 1
Arron
Top achievements
Rank 1
Share this question
or