🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

angular-drag-resize

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-drag-resize

Angular directives for draggable and resizable elements

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

angular-drag-resize

Angular.js directives for dragging and resizing elements.

Demo

https://plnkr.co/I8ebvx

Motivation

The drag directive is taken from the angular documentation (https://docs.angularjs.org/guide/directive), which unfortunately breaks the css resize property. The resize directive found in this package allows for a draggable element to also be resized.

Installation

Download the repo and include:

<script src="dist/angular-drag-resize.min.js"></script>

Via bower:

$ bower install angular-drag-resize

Via npm:

$ npm install angular-drag-resize

Via yarn:

$ yarn add angular-drag-resize

Usage

Inject angular.drag.resize into your app:

angular.module('myApp', ['angular.drag.resize']);

Then add draggable and/or resize to an element.

<div draggable resize>
    My draggable and resizeable div
</div>

The resize attribute can be set to horizontal or vertical to restrict resizing to one dimension.

<div resize="horizontal"></div>

Notes

For resizing to work, an element must have its css position as relative, fixed or absolute.

License

MIT.

FAQs

Package last updated on 12 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts