Skip to content
This repository has been archived by the owner on Apr 25, 2018. It is now read-only.

Commit

Permalink
Update to use oribella.on
Browse files Browse the repository at this point in the history
  • Loading branch information
stoffeastrom committed May 22, 2015
1 parent 6a07d27 commit 10fe5de
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 53 deletions.
49 changes: 24 additions & 25 deletions dist/commonjs/gestures.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ var _createClass = (function () { function defineProperties(target, props) { for

var _customAttribute$bindable$inject = require("aurelia-framework");

var _oribella = require("oribella");

var Gesture = (function () {
function Gesture(element, type) {
function Gesture(element, oribella, type) {
_classCallCheck(this, Gesture);

this.element = element;
this.oribella = oribella;
this.type = type;
}

_createClass(Gesture, [{
key: "bind",
value: function bind() {
this.remove = _oribella.oribella(this.element)[this.type]({
this.remove = this.oribella.on(this.element, this.type, {
selector: this.selector,
options: this.options,
start: this.start,
Expand All @@ -44,17 +43,17 @@ var Gesture = (function () {
})();

var Tap = (function (_Gesture) {
function Tap(element) {
function Tap(element, oribella) {
_classCallCheck(this, _Tap);

_get(Object.getPrototypeOf(Tap.prototype), "constructor", this).call(this, element, "tap");
_get(Object.getPrototypeOf(Tap.prototype), "constructor", this).call(this, element, oribella, "tap");
}

_inherits(Tap, _Gesture);

var _Tap = Tap;
Tap = _customAttribute$bindable$inject.customAttribute("tap")(Tap) || Tap;
Tap = _customAttribute$bindable$inject.inject(Element)(Tap) || Tap;
Tap = _customAttribute$bindable$inject.inject(Element, "oribella")(Tap) || Tap;
Tap = _customAttribute$bindable$inject.bindable("selector")(Tap) || Tap;
Tap = _customAttribute$bindable$inject.bindable("options")(Tap) || Tap;
Tap = _customAttribute$bindable$inject.bindable("start")(Tap) || Tap;
Expand All @@ -65,17 +64,17 @@ var Tap = (function (_Gesture) {
})(Gesture);

var Doubletap = (function (_Gesture2) {
function Doubletap(element) {
function Doubletap(element, oribella) {
_classCallCheck(this, _Doubletap);

_get(Object.getPrototypeOf(Doubletap.prototype), "constructor", this).call(this, element, "doubletap");
_get(Object.getPrototypeOf(Doubletap.prototype), "constructor", this).call(this, element, oribella, "doubletap");
}

_inherits(Doubletap, _Gesture2);

var _Doubletap = Doubletap;
Doubletap = _customAttribute$bindable$inject.customAttribute("doubletap")(Doubletap) || Doubletap;
Doubletap = _customAttribute$bindable$inject.inject(Element)(Doubletap) || Doubletap;
Doubletap = _customAttribute$bindable$inject.inject(Element, "oribella")(Doubletap) || Doubletap;
Doubletap = _customAttribute$bindable$inject.bindable("selector")(Doubletap) || Doubletap;
Doubletap = _customAttribute$bindable$inject.bindable("options")(Doubletap) || Doubletap;
Doubletap = _customAttribute$bindable$inject.bindable("start")(Doubletap) || Doubletap;
Expand All @@ -86,17 +85,17 @@ var Doubletap = (function (_Gesture2) {
})(Gesture);

var Longtap = (function (_Gesture3) {
function Longtap(element) {
function Longtap(element, oribella) {
_classCallCheck(this, _Longtap);

_get(Object.getPrototypeOf(Longtap.prototype), "constructor", this).call(this, element, "longtap");
_get(Object.getPrototypeOf(Longtap.prototype), "constructor", this).call(this, element, oribella, "longtap");
}

_inherits(Longtap, _Gesture3);

var _Longtap = Longtap;
Longtap = _customAttribute$bindable$inject.customAttribute("longtap")(Longtap) || Longtap;
Longtap = _customAttribute$bindable$inject.inject(Element)(Longtap) || Longtap;
Longtap = _customAttribute$bindable$inject.inject(Element, "oribella")(Longtap) || Longtap;
Longtap = _customAttribute$bindable$inject.bindable("selector")(Longtap) || Longtap;
Longtap = _customAttribute$bindable$inject.bindable("options")(Longtap) || Longtap;
Longtap = _customAttribute$bindable$inject.bindable("start")(Longtap) || Longtap;
Expand All @@ -108,17 +107,17 @@ var Longtap = (function (_Gesture3) {
})(Gesture);

var Swipe = (function (_Gesture4) {
function Swipe(element) {
function Swipe(element, oribella) {
_classCallCheck(this, _Swipe);

_get(Object.getPrototypeOf(Swipe.prototype), "constructor", this).call(this, element, "swipe");
_get(Object.getPrototypeOf(Swipe.prototype), "constructor", this).call(this, element, oribella, "swipe");
}

_inherits(Swipe, _Gesture4);

var _Swipe = Swipe;
Swipe = _customAttribute$bindable$inject.customAttribute("swipe")(Swipe) || Swipe;
Swipe = _customAttribute$bindable$inject.inject(Element)(Swipe) || Swipe;
Swipe = _customAttribute$bindable$inject.inject(Element, "oribella")(Swipe) || Swipe;
Swipe = _customAttribute$bindable$inject.bindable("selector")(Swipe) || Swipe;
Swipe = _customAttribute$bindable$inject.bindable("options")(Swipe) || Swipe;
Swipe = _customAttribute$bindable$inject.bindable("start")(Swipe) || Swipe;
Expand All @@ -129,17 +128,17 @@ var Swipe = (function (_Gesture4) {
})(Gesture);

var LongtapSwipe = (function (_Gesture5) {
function LongtapSwipe(element) {
function LongtapSwipe(element, oribella) {
_classCallCheck(this, _LongtapSwipe);

_get(Object.getPrototypeOf(LongtapSwipe.prototype), "constructor", this).call(this, element, "longtapswipe");
_get(Object.getPrototypeOf(LongtapSwipe.prototype), "constructor", this).call(this, element, oribella, "longtapswipe");
}

_inherits(LongtapSwipe, _Gesture5);

var _LongtapSwipe = LongtapSwipe;
LongtapSwipe = _customAttribute$bindable$inject.customAttribute("longtap-swipe")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = _customAttribute$bindable$inject.inject(Element)(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = _customAttribute$bindable$inject.inject(Element, "oribella")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = _customAttribute$bindable$inject.bindable("selector")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = _customAttribute$bindable$inject.bindable("options")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = _customAttribute$bindable$inject.bindable("start")(LongtapSwipe) || LongtapSwipe;
Expand All @@ -150,17 +149,17 @@ var LongtapSwipe = (function (_Gesture5) {
})(Gesture);

var Pinch = (function (_Gesture6) {
function Pinch(element) {
function Pinch(element, oribella) {
_classCallCheck(this, _Pinch);

_get(Object.getPrototypeOf(Pinch.prototype), "constructor", this).call(this, element, "pinch");
_get(Object.getPrototypeOf(Pinch.prototype), "constructor", this).call(this, element, oribella, "pinch");
}

_inherits(Pinch, _Gesture6);

var _Pinch = Pinch;
Pinch = _customAttribute$bindable$inject.customAttribute("pinch")(Pinch) || Pinch;
Pinch = _customAttribute$bindable$inject.inject(Element)(Pinch) || Pinch;
Pinch = _customAttribute$bindable$inject.inject(Element, "oribella")(Pinch) || Pinch;
Pinch = _customAttribute$bindable$inject.bindable("selector")(Pinch) || Pinch;
Pinch = _customAttribute$bindable$inject.bindable("options")(Pinch) || Pinch;
Pinch = _customAttribute$bindable$inject.bindable("start")(Pinch) || Pinch;
Expand All @@ -171,17 +170,17 @@ var Pinch = (function (_Gesture6) {
})(Gesture);

var Rotate = (function (_Gesture7) {
function Rotate(element) {
function Rotate(element, oribella) {
_classCallCheck(this, _Rotate);

_get(Object.getPrototypeOf(Rotate.prototype), "constructor", this).call(this, element, "rotate");
_get(Object.getPrototypeOf(Rotate.prototype), "constructor", this).call(this, element, oribella, "rotate");
}

_inherits(Rotate, _Gesture7);

var _Rotate = Rotate;
Rotate = _customAttribute$bindable$inject.customAttribute("rotate")(Rotate) || Rotate;
Rotate = _customAttribute$bindable$inject.inject(Element)(Rotate) || Rotate;
Rotate = _customAttribute$bindable$inject.inject(Element, "oribella")(Rotate) || Rotate;
Rotate = _customAttribute$bindable$inject.bindable("selector")(Rotate) || Rotate;
Rotate = _customAttribute$bindable$inject.bindable("options")(Rotate) || Rotate;
Rotate = _customAttribute$bindable$inject.bindable("start")(Rotate) || Rotate;
Expand Down
53 changes: 26 additions & 27 deletions dist/system/gestures.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
System.register(["aurelia-framework", "oribella"], function (_export) {
var customAttribute, bindable, inject, oribella, _get, _inherits, _classCallCheck, _createClass, Gesture, Tap, Doubletap, Longtap, Swipe, LongtapSwipe, Pinch, Rotate;
System.register(["aurelia-framework"], function (_export) {
var customAttribute, bindable, inject, _get, _inherits, _classCallCheck, _createClass, Gesture, Tap, Doubletap, Longtap, Swipe, LongtapSwipe, Pinch, Rotate;

return {
setters: [function (_aureliaFramework) {
customAttribute = _aureliaFramework.customAttribute;
bindable = _aureliaFramework.bindable;
inject = _aureliaFramework.inject;
}, function (_oribella) {
oribella = _oribella.oribella;
}],
execute: function () {
"use strict";
Expand All @@ -21,17 +19,18 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
_createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

Gesture = (function () {
function Gesture(element, type) {
function Gesture(element, oribella, type) {
_classCallCheck(this, Gesture);

this.element = element;
this.oribella = oribella;
this.type = type;
}

_createClass(Gesture, [{
key: "bind",
value: function bind() {
this.remove = oribella(this.element)[this.type]({
this.remove = this.oribella.on(this.element, this.type, {
selector: this.selector,
options: this.options,
start: this.start,
Expand All @@ -52,17 +51,17 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
})();

Tap = (function (_Gesture) {
function Tap(element) {
function Tap(element, oribella) {
_classCallCheck(this, _Tap);

_get(Object.getPrototypeOf(Tap.prototype), "constructor", this).call(this, element, "tap");
_get(Object.getPrototypeOf(Tap.prototype), "constructor", this).call(this, element, oribella, "tap");
}

_inherits(Tap, _Gesture);

var _Tap = Tap;
Tap = customAttribute("tap")(Tap) || Tap;
Tap = inject(Element)(Tap) || Tap;
Tap = inject(Element, "oribella")(Tap) || Tap;
Tap = bindable("selector")(Tap) || Tap;
Tap = bindable("options")(Tap) || Tap;
Tap = bindable("start")(Tap) || Tap;
Expand All @@ -73,17 +72,17 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
})(Gesture);

Doubletap = (function (_Gesture2) {
function Doubletap(element) {
function Doubletap(element, oribella) {
_classCallCheck(this, _Doubletap);

_get(Object.getPrototypeOf(Doubletap.prototype), "constructor", this).call(this, element, "doubletap");
_get(Object.getPrototypeOf(Doubletap.prototype), "constructor", this).call(this, element, oribella, "doubletap");
}

_inherits(Doubletap, _Gesture2);

var _Doubletap = Doubletap;
Doubletap = customAttribute("doubletap")(Doubletap) || Doubletap;
Doubletap = inject(Element)(Doubletap) || Doubletap;
Doubletap = inject(Element, "oribella")(Doubletap) || Doubletap;
Doubletap = bindable("selector")(Doubletap) || Doubletap;
Doubletap = bindable("options")(Doubletap) || Doubletap;
Doubletap = bindable("start")(Doubletap) || Doubletap;
Expand All @@ -94,17 +93,17 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
})(Gesture);

Longtap = (function (_Gesture3) {
function Longtap(element) {
function Longtap(element, oribella) {
_classCallCheck(this, _Longtap);

_get(Object.getPrototypeOf(Longtap.prototype), "constructor", this).call(this, element, "longtap");
_get(Object.getPrototypeOf(Longtap.prototype), "constructor", this).call(this, element, oribella, "longtap");
}

_inherits(Longtap, _Gesture3);

var _Longtap = Longtap;
Longtap = customAttribute("longtap")(Longtap) || Longtap;
Longtap = inject(Element)(Longtap) || Longtap;
Longtap = inject(Element, "oribella")(Longtap) || Longtap;
Longtap = bindable("selector")(Longtap) || Longtap;
Longtap = bindable("options")(Longtap) || Longtap;
Longtap = bindable("start")(Longtap) || Longtap;
Expand All @@ -116,17 +115,17 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
})(Gesture);

Swipe = (function (_Gesture4) {
function Swipe(element) {
function Swipe(element, oribella) {
_classCallCheck(this, _Swipe);

_get(Object.getPrototypeOf(Swipe.prototype), "constructor", this).call(this, element, "swipe");
_get(Object.getPrototypeOf(Swipe.prototype), "constructor", this).call(this, element, oribella, "swipe");
}

_inherits(Swipe, _Gesture4);

var _Swipe = Swipe;
Swipe = customAttribute("swipe")(Swipe) || Swipe;
Swipe = inject(Element)(Swipe) || Swipe;
Swipe = inject(Element, "oribella")(Swipe) || Swipe;
Swipe = bindable("selector")(Swipe) || Swipe;
Swipe = bindable("options")(Swipe) || Swipe;
Swipe = bindable("start")(Swipe) || Swipe;
Expand All @@ -137,17 +136,17 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
})(Gesture);

LongtapSwipe = (function (_Gesture5) {
function LongtapSwipe(element) {
function LongtapSwipe(element, oribella) {
_classCallCheck(this, _LongtapSwipe);

_get(Object.getPrototypeOf(LongtapSwipe.prototype), "constructor", this).call(this, element, "longtapswipe");
_get(Object.getPrototypeOf(LongtapSwipe.prototype), "constructor", this).call(this, element, oribella, "longtapswipe");
}

_inherits(LongtapSwipe, _Gesture5);

var _LongtapSwipe = LongtapSwipe;
LongtapSwipe = customAttribute("longtap-swipe")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = inject(Element)(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = inject(Element, "oribella")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = bindable("selector")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = bindable("options")(LongtapSwipe) || LongtapSwipe;
LongtapSwipe = bindable("start")(LongtapSwipe) || LongtapSwipe;
Expand All @@ -158,17 +157,17 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
})(Gesture);

Pinch = (function (_Gesture6) {
function Pinch(element) {
function Pinch(element, oribella) {
_classCallCheck(this, _Pinch);

_get(Object.getPrototypeOf(Pinch.prototype), "constructor", this).call(this, element, "pinch");
_get(Object.getPrototypeOf(Pinch.prototype), "constructor", this).call(this, element, oribella, "pinch");
}

_inherits(Pinch, _Gesture6);

var _Pinch = Pinch;
Pinch = customAttribute("pinch")(Pinch) || Pinch;
Pinch = inject(Element)(Pinch) || Pinch;
Pinch = inject(Element, "oribella")(Pinch) || Pinch;
Pinch = bindable("selector")(Pinch) || Pinch;
Pinch = bindable("options")(Pinch) || Pinch;
Pinch = bindable("start")(Pinch) || Pinch;
Expand All @@ -179,17 +178,17 @@ System.register(["aurelia-framework", "oribella"], function (_export) {
})(Gesture);

Rotate = (function (_Gesture7) {
function Rotate(element) {
function Rotate(element, oribella) {
_classCallCheck(this, _Rotate);

_get(Object.getPrototypeOf(Rotate.prototype), "constructor", this).call(this, element, "rotate");
_get(Object.getPrototypeOf(Rotate.prototype), "constructor", this).call(this, element, oribella, "rotate");
}

_inherits(Rotate, _Gesture7);

var _Rotate = Rotate;
Rotate = customAttribute("rotate")(Rotate) || Rotate;
Rotate = inject(Element)(Rotate) || Rotate;
Rotate = inject(Element, "oribella")(Rotate) || Rotate;
Rotate = bindable("selector")(Rotate) || Rotate;
Rotate = bindable("options")(Rotate) || Rotate;
Rotate = bindable("start")(Rotate) || Rotate;
Expand Down
2 changes: 1 addition & 1 deletion src/gestures.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Gesture {
this.type = type;
}
bind() {
this.remove = this.oribella(this.element)[this.type]({
this.remove = this.oribella.on(this.element, this.type, {
selector: this.selector,
options: this.options,
start: this.start,
Expand Down

0 comments on commit 10fe5de

Please sign in to comment.