I can draw sh开发者_StackOverflowapes on a canvas. Now I'd like to let users pan and zoom in and out using keyboard controls.
You could use variable to keep track of user feedback for zoom and pan, which you use as arguments to the translate()(pan) and scale()(zoom) functions.
It might help to have a look how Proessing.js fits with js/html/css.
HTH
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论