# simplyrotate-js

> A package to make it simple to open rotate html elements.

Latest version **1.0.2** (published 2022-09-23) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install simplyrotate-js
pnpm add simplyrotate-js
yarn add simplyrotate-js
bun add simplyrotate-js
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-09-23 |
| First published | 2022-09-23 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 50.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zachary Ishmael |
| Maintainers | zaederx |
| Keywords | rotate, js, ts, html, javascript, typescript |

## Links

- npm: https://www.npmjs.com/package/simplyrotate-js
- Repository: https://github.com/Zaederx/simplyrotate-js
- Homepage: https://github.com/Zaederx/simplyrotate-js#readme
- Issues: https://github.com/Zaederx/simplyrotate-js/issues
- npm.io page: https://npm.io/package/simplyrotate-js

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-09-23
- 1.0.1 — 2022-09-23
- 1.0.0 — 2022-09-23

## README

# simplyrotate-js
 Package to rotate elements with js

Attribution to this [post](https://stackoverflow.com/questions/48916517/javascript-click-and-drag-to-rotate) on stackoverflow for pointing out how to go about this.
Figured that this is a feature that many people just need a one stop solution for (particularly myself included). So here this is for when I or anyone might need it later.


# Usage:
HTML
```
<span class="rotatible"></span>
```

JavaScript
```
import { makeRotatable } from 'simplyrotate-js'

//get all elements classed rotatible
var rotatibleArr = document.querySelectorAll('.rotatible')
//for each of these called makeRotatable on them
rotatibleArr.forEach((r) => makeRotatable(r as HTMLElement))
```

and there you go...

It should just rotate on drag about the edges of your element

---
_Source: https://npm.io/package/simplyrotate-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
