View Full Version : Image Zoom in and Zoom out

20 May 2013, 8:51 PM
i am using extjs 3.4.

i am trying to zoom and rotate the images inside the panel using keys( Alt+right arrow,Alt+left arrow Alt + ,Alt -).

when i open the image from the grid panel and zoom it for the first time its works perfectly fine, after closing the same image and opening the same image second time and on zooming the function in red colour is called twice and zooming twice.

i have no idea why the function is called twice on keying Alt+,
any suggestions would be helpfull..

or do we have any other way of doing this..

Ext.onReady(function () { var keystroke = new Ext.KeyMap(document, {

key: [107,109,37,39],
alt : true,
scope: this,
fn:function(key) {

case 107 : // '+' button on keypad
-- my code which zooms the image
-- will get the height and width of the image and on clicking Alt + i am increasing the height to height+200 and width to width+200

case 109 : // '-' button on keypad

case 37 : // Left arrow

case 39 : // Right arrow