Skip to content

Commit

Permalink
build v1.2.1
Browse files Browse the repository at this point in the history
remove EventEmitter from .json dependencies
add contributing.md
requireJS draggabilly.pkgd.js link
remove contaiment from multiple vanilla JS
changelog
tick version 1.2.1
  • Loading branch information
desandro committed Mar 11, 2015
1 parent f013f55 commit b0962ff
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var draggies = []
for ( var i=0, len = draggableElems.length; i < len; i++ ) {
var draggableElem = draggableElems[i];
var draggie = new Draggabilly( draggableElem, {
containment: true
// options...
});
draggies.push( draggie );
}
Expand Down Expand Up @@ -312,7 +312,7 @@ console.log( 'draggie at ' + draggie.position.x + ', ' + draggie.position.y )

Draggabilly works with [RequireJS](http://requirejs.org).

You can require [draggabilly.pkgd.js](http://draggabilly.desandro.io/draggabilly.pkgd.js).
You can require `draggabilly.pkgd.js`..

``` js
requirejs( [
Expand Down
3 changes: 1 addition & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "draggabilly",
"main": "draggabilly.js",
"version": "1.2.0",
"version": "1.2.1",
"description": "make that shiz draggable",
"dependencies": {
"classie": "~1.0.1",
"eventEmitter": ">=3 <5",
"get-size": "~1.2.2",
"get-style-property": "~1.0.4",
"unidragger": "~1.1.0"
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Changelog

#### v1.2.1

+ Fixed bug not removing `is-pointer-down` class
+ Fixed bug to ignore `dragMove` or `dragEnd` when disabled

### v1.2.0

+ Integrated [Unidragger](https://github.com/metafizzy/unidragger)
- Changed `dragStart` to trigger when dragging starts, rather than on pointer down. Fixed [#13](https://github.com/desandro/draggabilly/issues/13).
- Add `staticClick` event. Fixed [#19](https://github.com/desandro/draggabilly/issues/13).
+ Added jQuery plugin support. Fixed [#73](https://github.com/desandro/draggabilly/issues/73).
+ Removed `draggieInstance` first argument from event callbacks
+ Added `is-pointer-down` class
+ Added tests

#### v1.1.2
Expand Down
11 changes: 11 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Submitting issues

### Reduced test case required

All bug reports and problem issues require a [**reduced test case**](http://css-tricks.com/reduced-test-cases/). Create one by forking any one of the [CodePen demos](http://codepen.io/desandro/tag/draggabilly-docs) from [the docs](http://draggabilly.desandro.com). Try forking the [basic jQuery demo](http://codepen.io/desandro/pen/yyRapr) or [vanilla JS demo](http://codepen.io/desandro/pen/EadgXx).

+ A reduced test case clearly demonstrates the bug or issue.
+ It contains the bare minimum HTML, CSS, and JavaScript required to demonstrate the bug.
+ A link to your production site is **not** a reduced test case.

Providing a reduced test case is the best way to get your issue addressed. They help you point out the problem. They help me verify and debug the problem. They help others understand the problem. Without a reduced test case, your issue may be closed.
13 changes: 10 additions & 3 deletions dist/draggabilly.pkgd.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Draggabilly PACKAGED v1.2.0
* Draggabilly PACKAGED v1.2.1
* Make that shiz draggable
* http://draggabilly.desandro.com
* MIT license
Expand Down Expand Up @@ -1737,7 +1737,7 @@ return Unidragger;
}));

/*!
* Draggabilly v1.2.0
* Draggabilly v1.2.1
* Make that shiz draggable
* http://draggabilly.desandro.com
* MIT license
Expand Down Expand Up @@ -1883,7 +1883,7 @@ function Draggabilly( element, options ) {
this._create();
}

// inherit EventEmitter methods
// inherit Unidragger methods
extend( Draggabilly.prototype, Unidragger.prototype );

Draggabilly.defaults = {
Expand Down Expand Up @@ -2083,6 +2083,9 @@ Draggabilly.prototype.measureContainment = function() {
* @param {Event or Touch} pointer
*/
Draggabilly.prototype.dragMove = function( event, pointer, moveVector ) {
if ( !this.isEnabled ) {
return;
}
var dragX = moveVector.x;
var dragY = moveVector.y;

Expand Down Expand Up @@ -2135,6 +2138,7 @@ Draggabilly.prototype.containDrag = function( axis, drag, grid ) {
* @param {Event or Touch} pointer
*/
Draggabilly.prototype.pointerUp = function( event, pointer ) {
classie.remove( this.element, 'is-pointer-down' );
this.dispatchEvent( 'pointerUp', event, [ pointer ] );
this._dragPointerUp( event, pointer );
};
Expand All @@ -2145,6 +2149,9 @@ Draggabilly.prototype.pointerUp = function( event, pointer ) {
* @param {Event or Touch} pointer
*/
Draggabilly.prototype.dragEnd = function( event, pointer ) {
if ( !this.isEnabled ) {
return;
}
this.isDragging = false;
// use top left position when complete
if ( transformProperty ) {
Expand Down
4 changes: 2 additions & 2 deletions dist/draggabilly.pkgd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions draggabilly.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Draggabilly v1.2.0
* Draggabilly v1.2.1
* Make that shiz draggable
* http://draggabilly.desandro.com
* MIT license
Expand Down Expand Up @@ -145,7 +145,7 @@ function Draggabilly( element, options ) {
this._create();
}

// inherit EventEmitter methods
// inherit Unidragger methods
extend( Draggabilly.prototype, Unidragger.prototype );

Draggabilly.defaults = {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "draggabilly",
"version": "1.2.0",
"version": "1.2.1",
"description": "make that shiz draggable",
"main": "draggabilly.js",
"dependencies": {
"desandro-classie": "~1.0.1",
"wolfy87-eventemitter": ">=3 <5",
"get-size": "~1.2.2",
"desandro-get-style-property": "~1.0.4",
"unidragger": "~1.1.0"
Expand Down

0 comments on commit b0962ff

Please sign in to comment.