Author: | bruntouchables |
---|---|
Views Total: | 401 views |
Official Page: | Go to website |
Last Update: | November 3, 2022 |
License: | MIT |
Preview:

Description:
A tiny JavaScript library that enables Resizable & Rotatable functionalities on DOM elements.
How to use it:
1. Download and import the resizable.js.
<script src="resizable.js"></script>
2. Enable a DOM element to be Resizable and Rotatable.
<h1 id=”example”>Hello, world</h1>
let element = document.getElementById('example'); new Resizable(element);
3. Keep the aspect ratio while resizing. Default: false.
new Resizable(element,{ keepRatio: true });
4. Specify the scale factor. Default: 1.0.
new Resizable(element,{ scale: 1.5 });
5. Custom resize & rotate handles.
new Resizable(element,{ handles: '<span class="resize-handle resize-handle-rotate"></span>' });
6. Set the initial angle.
new Resizable(element,{ angle: 90 });