1.0.6 • Published 1 year ago

tinyview.js v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

TinyView.js

TinyView.js is a lightweight javascript Image Viewer

Version Gzip Size

Features Demo

Features

  • Zoom In
  • Zoom Out
  • Left Rotation
  • Right Rotation
  • Move Image

Main Files and Descriptions

src/
├── tinyview.css       (uncompressed)
├── tinyview.min.css   (compressed)
├── tinyview.js        (uncompressed)
└── tinyview.min.js    (compressed)

Getting Started

Installation

NPM

npm install tinyview.js

In browser:

<link  href="/path/to/tinyview.min.css" rel="stylesheet">
<script src="/path/to/tinyview.min.js"></script>

Example

<html>
    <body>
        <img width="200px" id="elem1" src="./image1.jpg">
        <img width="200px" id="elem2" src="./image2.jpg">
    </body>
  
    <script>
        const elem1 = document.getElementById("elem1");
        const elem2 = document.getElementById("elem2");
        const tinyview = new TinyView(elem1, elem2);
    </script>
</html>