Package Exports
- resizable
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (resizable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Resizable
Makes any element resizable. Just as jQuery-UI resizable, but simplier and with no jQuery.
Use
You have to use browserify, component, duo, webmake or any other browser require
provider in order to use resizable.
$ npm install resizable
var Resizable = require('resizable');
//make an element draggable
var el = document.querySelector('.my-element');
var resizable = new Resizable(el, {
//options
release: true,
sniper: false,
axis: 'x'
});
resizable.on('resize', function(){
//...
});
Options
Parameter | Default | Description |
---|---|---|
within |
undefined |
Restrict resizing within the container |
handles |
'e,w,n,s,nw,ne,sw,se' |
CSL/Array/Object of handles. Pass specific elements keyed by directions to make them handles. |
Events
Name | Description |
---|---|
dragstart |
Drag start |
drag |
Drag iteration |
release |
User released drag |
dragend |
Drag finished, called after release (stopped) |