npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-dnd-module

v0.1.25

Published

[![Join the chat at https://gitter.im/Tuch/angular-dnd](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Tuch/angular-dnd?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Downloads

188

Readme

Join the chat at https://gitter.im/Tuch/angular-dnd

Angular-DND 0.1.25

Features:

  • Not jQueryUI wrapper
  • Support touch events

Directives:

dnd-draggable [expression]

Provides movement ability to the element. Parameter 'false' disables the directive.

dnd-draggable-opts [object] - directive options:

  • layer[string]: What would droppable elements react to draggable elements, they must be in a single layer. By default, layer = 'common'
  • useAsPoint[boolean]: Droppable area will interact with the item only if the manipulator cursor will be within the droppable element
  • helper[string]: 'clone' or templateUrl - allow to move to use helper, instead of the element
  • handle[string]: Selector of handle element to be used for pulling element

watching attributes:

  • dnd-on-dragstart [function()]: Triggered at the start of drag element
  • dnd-on-drag [function()]: Triggered at the process of drag element
  • dnd-on-dragend [function()]: Triggered at the end of drag element

scope:

  • $dragged [boolean] - Register that lets you know whether the movement element during the last cycle of events (the last ~ 5ms). Convenient to use for example in ng-click (see. Example).
  • $dropmodel [string] - Droppable element model defined in the dnd-model directive

dnd-pointer-none

Attribute operates similar to the pointer-events: none - ignoring the event, but in relation to dnd- directives (see Example 2 sortable directive - the text field)

dnd-droppable [expression]

Create targets for draggable elements. Parameter 'false' disables the directive.

dnd-droppable-opts [object]:

  • layer[string]: What would droppable elements react to draggable elements, they must be in a single layer. By default, layer = 'common'

watching attributes:

  • dnd-on-dragenter [function()]: Triggered when hit draggable within the droppable
  • dnd-on-dragover [function()]: Triggered when an accepted draggable is dragged over the droppable
  • dnd-on-dragleave [function()]: Triggered when leave draggable within the droppable
  • dnd-on-drop [function()]: Triggered when an accepted draggable is dropped on the droppable

scope:

  • $dragmodel [string] Draggable element model defined in the dnd-model directive

dnd-rotatable [expression]

Provides rotate ability to the element. Parameter 'false' disables the directive.

watching attributes:

  • dnd-on-dragstart [function()]: Triggered at the start of element rotation
  • dnd-on-drag [function()]: Triggered at the process of element rotation
  • dnd-on-dragend [function()]: Triggered at the end of element rotation

scope:

  • $rotated [boolean] - Register that lets you know whether the element rotation during the last cycle of events (the last ~ 5ms). Convenient to use for example in ng-click (see. Example).

dnd-resizable [expression]

Provides resize ability to the element. Parameter 'false' disables the directive.

watching attributes:

  • dnd-on-dragstart [function()]: Triggered at the start of resizing element
  • dnd-on-drag [function()]: Triggered at the process of resizing element
  • dnd-on-dragend [function()]: Triggered at the end of resizing element

scope:

  • $resized [boolean] - Register that lets you know whether the element resizing during the last cycle of events (the last ~ 5ms). Convenient to use for example in ng-click (see. Example).

dnd-sortable-list [expression]

List of sortable items

dnd-sortable [expression]

Reorder elements in a list or grid.

watching attributes:

  • dnd-on-sortstart [function()]: Triggered at the start of sorting element
  • dnd-on-sort [function()]: Triggered at the process of sorting element
  • dnd-on-sortchange [function()]: This event is triggered during sorting, but only when the DOM position has changed
  • dnd-on-sortend [function()]: Triggered at the end of sorting element

dnd-lasso-area [expression]

This Directive is to create rect models with lasso tool. Also, this directive can work with a selectable directive (as a container) (see. Example). Parameter 'false' disables the directive.

watching attributes:

  • dnd-on-lassostart [function()]: Triggered at the start of lasso change size
  • dnd-on-lasso [function([rect])]: Triggered at process of lasso change size
  • dnd-on-lassoend [function([rect])]: Triggered at end of lasso change size

scope:

  • $dragged [boolean] - Register that lets you know whether the movement leasso during the last cycle of events (the last ~ 5ms). Convenient to use for example in ng-click (see. Example).

dnd-selectable [expression]

Use manipulator to select elements, individually or in a group.

Requirements:

  • dnd-lasso-area как родительский элемент

watching attributes:

  • dnd-on-selected [function([$keyPressed])]: interrupt after changing selected value (dnd-model-selected) from false to true.
  • dnd-on-unselected [function([$keyPressed])]: interrupt after changing selected value (dnd-model-selected) from true на false.
  • dnd-on-selecting [function([$keyPressed])]: interrupt after changing selecting value (dnd-model-selecting) from false на true.
  • dnd-on-unselecting [function([$keyPressed])]: interrupt after changing selecting value (dnd-model-selecting) from true на false.

model attributes:

  • dnd-model-selected: varibale name of selected state
  • dnd-model-selecting: varibale name of selecting state

scope:

  • $keypressed - Register that indicates whether the button is pressed ctrl, shift or cmd during the event

Sequence of events:

  • if click - selected(true/false).
  • If not click - selecting(true) -> selected(true/false) -> selecting(false)

dnd-rect (string)

Model of element rectangle (top, left, width, height, transform). Core directive. Use with dnd-draggable, dnd-resizable, dnd-rotatable, dnd-fittext, dnd-sortable, and also dnd-selectable(optional) work with dnd-rect.

dnd-containment(string, selector)

Containment work area of draggable/resizable/rotatable elements. By default containment is body.

dnd-fittext (mix)

Directive for text fitting under element sizes.

dnd-fittext parameter:

  • Value, change which triggers resizing text. (ex: {width: rect.width, height: rect.height, text: rect.text}. see example)

  • dnd-fittext-min - min font size in px

  • dnd-fittext-max - max font size in px

Services:

DndLasso

Service-Class to provide directives interface of the rectangular lasso tool

dndKey

Service for control key pressing

Methods

  • get(): get array of pressed keys
  • isset(code): check key state by key code

Examples

  • All examples inside demo folder
  • Also available link

Plunkers

TODO:

  • more options
    • ensure rapid expandability options
  • supporting touch specific events (rotate, resize)
  • supporting dynamic options
  • supporting ng-animate
  • supporting HTML5 dnd events

PS:

Sorry for bad translation. Waiting for your pull requests.

Join the chat at https://gitter.im/Tuch/angular-dnd