Skip to content

Commit

Permalink
Build for Release
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmalonenz committed Mar 18, 2016
1 parent a8e8524 commit c068190
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 26 deletions.
21 changes: 14 additions & 7 deletions dist/amd/dragula.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/class-call-check', 'aurelia-dependency-injection', './touchy', './options', './util', './emitter', './classes'], function (exports, _babelRuntimeHelpersCreateClass, _babelRuntimeHelpersClassCallCheck, _aureliaDependencyInjection, _touchy, _options, _util, _emitter, _classes) {
define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/class-call-check', 'babel-runtime/core-js/object/assign', 'aurelia-dependency-injection', './touchy', './options', './util', './emitter', './classes'], function (exports, _babelRuntimeHelpersCreateClass, _babelRuntimeHelpersClassCallCheck, _babelRuntimeCoreJsObjectAssign, _aureliaDependencyInjection, _touchy, _options, _util, _emitter, _classes) {
'use strict';

Object.defineProperty(exports, '__esModule', {
Expand All @@ -9,10 +9,11 @@ define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/

var Dragula = (function () {
function Dragula(options) {
(0, _babelRuntimeHelpersClassCallCheck['default'])(this, _Dragula);
(0, _babelRuntimeHelpersClassCallCheck['default'])(this, Dragula);

var len = arguments.length;
this.options = options || new _options.Options();
var globalOptions = _aureliaDependencyInjection.Container.instance.get(_options.GLOBAL_OPTIONS);
this.options = (0, _babelRuntimeCoreJsObjectAssign['default'])({}, globalOptions, options);
this.emitter = new _emitter.Emitter();
this.dragging = false;

Expand Down Expand Up @@ -43,6 +44,16 @@ define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/
value: function on(eventName, callback) {
this.emitter.on(eventName, callback);
}
}, {
key: 'once',
value: function once(eventName, callback) {
this.emitter.once(eventName, callback);
}
}, {
key: 'off',
value: function off(eventName, fn) {
this.emitter.off(eventName, fn);
}
}, {
key: 'isContainer',
value: function isContainer(el) {
Expand Down Expand Up @@ -200,8 +211,6 @@ define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/
this._initialSibling = context.item.nextSibling;
this._currentSibling = _util.Util.nextEl(context.item);

this._timeSinceLastMove = Date.now() + MIN_TIME_BETWEEN_REDRAWS_MS;

this.dragging = true;
this.emitter.emit('drag', this._item, this._source);
}
Expand Down Expand Up @@ -510,8 +519,6 @@ define(['exports', 'babel-runtime/helpers/create-class', 'babel-runtime/helpers/
this.options.containers = value;
}
}]);
var _Dragula = Dragula;
Dragula = (0, _aureliaDependencyInjection.inject)(_options.GLOBAL_OPTIONS)(Dragula) || Dragula;
return Dragula;
})();

Expand Down
21 changes: 15 additions & 6 deletions dist/commonjs/dragula.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ var _createClass = require('babel-runtime/helpers/create-class')['default'];

var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default'];

var _Object$assign = require('babel-runtime/core-js/object/assign')['default'];

var _interopRequireWildcard = require('babel-runtime/helpers/interop-require-wildcard')['default'];

Object.defineProperty(exports, '__esModule', {
Expand All @@ -28,10 +30,11 @@ var MIN_TIME_BETWEEN_REDRAWS_MS = 20;

var Dragula = (function () {
function Dragula(options) {
_classCallCheck(this, _Dragula);
_classCallCheck(this, Dragula);

var len = arguments.length;
this.options = options || new _options.Options();
var globalOptions = _aureliaDependencyInjection.Container.instance.get(_options.GLOBAL_OPTIONS);
this.options = _Object$assign({}, globalOptions, options);
this.emitter = new _emitter.Emitter();
this.dragging = false;

Expand Down Expand Up @@ -62,6 +65,16 @@ var Dragula = (function () {
value: function on(eventName, callback) {
this.emitter.on(eventName, callback);
}
}, {
key: 'once',
value: function once(eventName, callback) {
this.emitter.once(eventName, callback);
}
}, {
key: 'off',
value: function off(eventName, fn) {
this.emitter.off(eventName, fn);
}
}, {
key: 'isContainer',
value: function isContainer(el) {
Expand Down Expand Up @@ -219,8 +232,6 @@ var Dragula = (function () {
this._initialSibling = context.item.nextSibling;
this._currentSibling = _util.Util.nextEl(context.item);

this._timeSinceLastMove = Date.now() + MIN_TIME_BETWEEN_REDRAWS_MS;

this.dragging = true;
this.emitter.emit('drag', this._item, this._source);
}
Expand Down Expand Up @@ -530,8 +541,6 @@ var Dragula = (function () {
}
}]);

var _Dragula = Dragula;
Dragula = (0, _aureliaDependencyInjection.inject)(_options.GLOBAL_OPTIONS)(Dragula) || Dragula;
return Dragula;
})();

Expand Down
16 changes: 11 additions & 5 deletions dist/es6/dragula.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {inject} from 'aurelia-dependency-injection';
import {inject, Container} from 'aurelia-dependency-injection';
import {touchy} from './touchy';
import {GLOBAL_OPTIONS, Options} from './options';
import {Util} from './util';
Expand All @@ -7,12 +7,12 @@ import * as classes from './classes';

const MIN_TIME_BETWEEN_REDRAWS_MS = 20;

@inject(GLOBAL_OPTIONS)
export class Dragula {

constructor(options) {
let len = arguments.length;
this.options = options || new Options();
let globalOptions = Container.instance.get(GLOBAL_OPTIONS);
this.options = Object.assign({}, globalOptions, options);
this.emitter = new Emitter();
this.dragging = false;

Expand Down Expand Up @@ -42,6 +42,14 @@ export class Dragula {
this.emitter.on(eventName, callback);
}

once(eventName, callback) {
this.emitter.once(eventName, callback);
}

off(eventName, fn) {
this.emitter.off(eventName, fn);
}

get containers() {
return this.options.containers;
}
Expand Down Expand Up @@ -195,8 +203,6 @@ export class Dragula {
this._initialSibling = context.item.nextSibling;
this._currentSibling = Util.nextEl(context.item);

this._timeSinceLastMove = Date.now() + MIN_TIME_BETWEEN_REDRAWS_MS; //ensure that the first frame draws...

this.dragging = true;
this.emitter.emit('drag', this._item, this._source);
}
Expand Down
26 changes: 18 additions & 8 deletions dist/system/dragula.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/class-call-check', 'aurelia-dependency-injection', './touchy', './options', './util', './emitter', './classes'], function (_export) {
var _createClass, _classCallCheck, inject, touchy, GLOBAL_OPTIONS, Options, Util, Emitter, classes, MIN_TIME_BETWEEN_REDRAWS_MS, Dragula;
System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/class-call-check', 'babel-runtime/core-js/object/assign', 'aurelia-dependency-injection', './touchy', './options', './util', './emitter', './classes'], function (_export) {
var _createClass, _classCallCheck, _Object$assign, inject, Container, touchy, GLOBAL_OPTIONS, Options, Util, Emitter, classes, MIN_TIME_BETWEEN_REDRAWS_MS, Dragula;

return {
setters: [function (_babelRuntimeHelpersCreateClass) {
_createClass = _babelRuntimeHelpersCreateClass['default'];
}, function (_babelRuntimeHelpersClassCallCheck) {
_classCallCheck = _babelRuntimeHelpersClassCallCheck['default'];
}, function (_babelRuntimeCoreJsObjectAssign) {
_Object$assign = _babelRuntimeCoreJsObjectAssign['default'];
}, function (_aureliaDependencyInjection) {
inject = _aureliaDependencyInjection.inject;
Container = _aureliaDependencyInjection.Container;
}, function (_touchy) {
touchy = _touchy.touchy;
}, function (_options) {
Expand All @@ -27,10 +30,11 @@ System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/cl

Dragula = (function () {
function Dragula(options) {
_classCallCheck(this, _Dragula);
_classCallCheck(this, Dragula);

var len = arguments.length;
this.options = options || new Options();
var globalOptions = Container.instance.get(GLOBAL_OPTIONS);
this.options = _Object$assign({}, globalOptions, options);
this.emitter = new Emitter();
this.dragging = false;

Expand Down Expand Up @@ -61,6 +65,16 @@ System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/cl
value: function on(eventName, callback) {
this.emitter.on(eventName, callback);
}
}, {
key: 'once',
value: function once(eventName, callback) {
this.emitter.once(eventName, callback);
}
}, {
key: 'off',
value: function off(eventName, fn) {
this.emitter.off(eventName, fn);
}
}, {
key: 'isContainer',
value: function isContainer(el) {
Expand Down Expand Up @@ -218,8 +232,6 @@ System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/cl
this._initialSibling = context.item.nextSibling;
this._currentSibling = Util.nextEl(context.item);

this._timeSinceLastMove = Date.now() + MIN_TIME_BETWEEN_REDRAWS_MS;

this.dragging = true;
this.emitter.emit('drag', this._item, this._source);
}
Expand Down Expand Up @@ -529,8 +541,6 @@ System.register(['babel-runtime/helpers/create-class', 'babel-runtime/helpers/cl
}
}]);

var _Dragula = Dragula;
Dragula = inject(GLOBAL_OPTIONS)(Dragula) || Dragula;
return Dragula;
})();

Expand Down

0 comments on commit c068190

Please sign in to comment.