Pinch Zoom in Android with Phonegap and jQUERY Mobile

前端 未结 3 1987
伪装坚强ぢ
伪装坚强ぢ 2021-02-08 03:21

I have been having difficult getting pinch zoom to work in the webapp I am creating with Phonegap. Currently, I am loading information into a p tag view a remote script, but the

3条回答
  •  温柔的废话
    2021-02-08 03:57

    binding the component to be pinched with gesture event can be done. e.g.

    var con=document.getElementById('containerId');
    
    con.addEventListener('gesturechange',function(e){
        if(e.scale>1)
        {
            //zoom in 
        }
        else if(e.scale<1)
        {
            //zoom out 
        }
    });
    

提交回复
热议问题