Skip to content

added Meteor package.js Package info #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
angular:[email protected]
heinerion:[email protected]
[email protected]_2
[email protected]
mizzao:[email protected]
mizzao:[email protected]
[email protected]
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#Drag and Drop for AngularJS (with Animation) [![Build Status](https://api.travis-ci.org/codef0rmer/angular-dragdrop.svg?branch=master)](https://travis-ci.org/codef0rmer/angular-dragdrop)
# Drag and Drop for AngularJS (with Animation) [![Build Status](https://api.travis-ci.org/codef0rmer/angular-dragdrop.svg?branch=master)](https://travis-ci.org/codef0rmer/angular-dragdrop)

---

Implementing jQueryUI Drag and Drop functionality in AngularJS is easier than ever which is a wrapper for jQueryUI draggable/droppable components.


###v1.0.9 - breaking change
### v1.0.9 - breaking change
1. Draggable and Droppable will not be [deep copied](https://egghead.io/lessons/angularjs-angular-copy-for-deep-copy) by default unlike previous versions. Use `deepCopy` option if prototypical inheritance is not required.
2. Callbacks will not be executed forcefully within the context of scope which requires an extra digest loop for each event (start, stop, over, out, etc), especially drag that fires many times and running a digest loop is performance intensive in such scenario. Call `scope.$apply()` within callback, if needed.


##How to Use
## How to Use

* `bower install angular-dragdrop` (or `sudo bower install angular-dragdrop --allow-root`)
* Reference `angular-dragdrop.min.js` in your application as:
Expand All @@ -31,7 +31,7 @@ angular.module('myApp', ['ngDragDrop'])
```
* Finally, check out [the cool demos](http://codef0rmer.github.io/angular-dragdrop/#/)

##Angular Draggable options
## Angular Draggable options
* **jqyoui-draggable** – A custom angular attribute to make any element draggable. It holds more settings such as:
* **index** – number – $index of an item of a model (if it is an array) associated with it
* **placeholder** – boolean/string – If true, the place will be occupied even though a dragggable is moved/dropped somewhere else. If 'keep' is supplied, the original item won't be removed from the draggable.
Expand All @@ -40,14 +40,14 @@ angular.module('myApp', ['ngDragDrop'])
* **onStop** – string – callback method to be invoked when dragging stops
* **onDrag** – string – callback method to be invoked while the mouse is moved during the dragging
* **applyFilter** - string - applies AngularJS $filter on the list before swapping items. Only applicable, if ngRepeat has any filter (such as orderBy, limitTo) associated with it.
* **containment** – string - position/offset. Offset by default. This forces to use jQuery.position() or jQuery.offset() to calculate proper position with respect to parent element or document respectively.
* **containment** – string - position/offset. Offset by default. This forces to use jQuery.position() or jQuery.offset() to calculate proper position with respect to parent element or document respectively.
* **deepCopy** - boolean (optional) – If true, makes a deep copy of draggable that looses prototypical inheritance.
* **beforeDrop** – promise (optional) – Ask for confirmation before swapping. Works with both window.confirm and custom popup.
* **beforeDrop** – promise (optional) – Ask for confirmation before swapping. Works with both window.confirm and custom popup.
* **data-drag** – boolean – If true, element can be draggable. Disabled otherwise.
* **data-jqyoui-options** – object – should hold all the valid options supported by [jQueryUI Draggable](http://api.jqueryui.com/draggable)
* **ng-model** – string – An angular model defined in a controller. Should be a JS array or object

##Angular Droppable options
## Angular Droppable options
* **jqyoui-droppable** – A custom angular attribute to make any element droppable. It holds more settings such as:
* **index** – number – $index of an item of a model (if it is an array) associated with it
* **multiple** – boolean – Requires to be true only if animate is set to true for draggable and to avoid swapping.
Expand All @@ -56,32 +56,32 @@ angular.module('myApp', ['ngDragDrop'])
* **onOver** – string – callback method to be invoked when an accepted draggable is dragged over the droppable
* **onOut** – string – callback method to be invoked when an accepted draggable is dragged out of the droppable
* **applyFilter** - string - requires if both droppable as well as draggable share the same ngModel.
* **containment** – string - position/offset. Offset by default. This forces to use jQuery.position() or jQuery.offset() to calculate proper position with respect to parent element or document respectively.
* **containment** – string - position/offset. Offset by default. This forces to use jQuery.position() or jQuery.offset() to calculate proper position with respect to parent element or document respectively.
* **deepCopy** – boolean (optional) – If true, makes a deep copy of droppable that looses prototypical inheritance.
* **beforeDrop** – promise (optional) – Ask for confirmation before dropping. Works with both window.confirm and custom popup.
* **beforeDrop** – promise (optional) – Ask for confirmation before dropping. Works with both window.confirm and custom popup.
* **data-drop** – boolean – If true, element can be droppable. Disabled otherwise.
* **data-jqyoui-options** – object – should hold all the valid options supported by [jQueryUI Droppable](http://api.jqueryui.com/droppable)
* **ng-model** – string – An angular model defined in a controller. Should be a JS array or object.

##How to Contribute
## How to Contribute
* $ git clone https://github.com/codef0rmer/angular-dragdrop.git
* $ cd angular-dragdrop
* $ npm install --quiet -g karma-cli bower
* $ sudo npm install
* $ sudo bower install --force-latest
* $ npm test

##Demo
## Demo
Demo is [here](http://codef0rmer.github.io/angular-dragdrop/#/)


###v1.0.5 - breaking change
Do not pass evaluated expressions in callbacks. For example,
####Before:
### v1.0.5 - breaking change
Do not pass evaluated expressions in callbacks. For example,
#### Before:
```
<div jqyoui-draggable="{onStart:'startCallback({{item}})'}">{{item.title}}</div>
```
####After:
#### After:
```
<div jqyoui-draggable="{onStart:'startCallback(item)'}">{{item.title}}</div>
```
Expand Down
28 changes: 28 additions & 0 deletions package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// package metadata file for Meteor.js
var packageName = 'heinerion:angular-dragdrop';
var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing.
var version = '1.0.11';
var summary = "This directive allows you to use jQuery UI's draggable and droppable plugins with AngularJS.";
var gitLink = 'https://github.com/codef0rmer/angular-dragdrop';
var documentationFile = 'README.md';

// Meta-data
Package.describe({
name: packageName,
version: version,
summary: summary,
git: gitLink,
documentation: documentationFile
});

Package.onUse(function(api) {
api.versionsFrom(['[email protected]', '[email protected]']); // Meteor versions

api.use([
'angular:[email protected]',
'mizzao:[email protected]'
], where);

// Meteor minifies for you!
api.addFiles('src/angular-dragdrop.js', where); // Files in use
});