Skip to content

Pan & zoom library for drawings, schemes and maps. No dependencies, vanila.

License

Notifications You must be signed in to change notification settings

Dystopiaru/Panzoom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 

Repository files navigation

Demo

Features

  • Drag scroll and zoom
  • Optimized for Mobile Devices
  • Momentum scroll
  • Lightweight
  • No dependencies

Usage:

<html>
  <body>
    <div id="scheme-wrapper">
      <div id="scheme">
        <!--Your content Here-->
      </div>
    </div>
    
    <style>
    body { 
      overflow:hidden;
    }
    #scheme-wrapper {
      position: fixed;
      top:0px;
      left:0px;	
      padding: 0px;
      margin: 0px;	
      cursor: grab;
      width: 100vw;
      height: 100vh;
      overflow: scroll;
    }
    </style>
    <script src="dystopiaru.panzoom.js"></script>
    <script>
      const elScheme = document.getElementById('scheme');
      const objPanzoom  = new dystopiaru.panzoom(elScheme);
    </script>
  </body>
</html>

Releases

No releases published

Packages

No packages published