Draggable, Resizable & Rotatable Plugin – Drag-resize-rotate-library

微信扫一扫,分享到朋友圈

Draggable, Resizable & Rotatable Plugin – Drag-resize-rotate-library

Demo Download

Author: nichollascarter
Views Total: 163
Official Page: Go to website
Last Update: November 6, 2018
License: MIT

Preview:

Description:

A Photoshop inspired, touch-enabled draggable, resizable and rotatable library without any 3rd dependencies.

How to use it:

Import the Drag-resize-rotate-library’s files into the html file.

<script type="text/javascript" src="subj.js"></script>
<link rel="stylesheet" href="subj.css">

Initialize the Drag-resize-rotate-library on an element you specify.

<div id='example'>
  Element to drag, resize, rotate
</div>
Subj('#example').draggle();

Set the snap size (default: 10).

Subj('#example').draggle({
  snap: 20
});

Execute a function after the element is dragged.

Subj('#example').draggle({
  drop: (e,el) => {console.log(el);},
});

The library also provides a functionality to clone element.

Subj('#example')..clone({
  stack: 'selector',
  style: 'clone', // or custom styles
  appendTo: 'selector'
});

Changelog:

11/06/2018

  • Minor changes

微信扫一扫,分享到朋友圈

Draggable, Resizable & Rotatable Plugin – Drag-resize-rotate-library

新iPad Pro跑分公布!超越55万秒天秒地

上一篇

js复杂判断的更优雅写法

下一篇

你也可能喜欢

Draggable, Resizable & Rotatable Plugin – Drag-resize-rotate-library

长按储存图像,分享给朋友