Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oribella-longtap-swipe

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oribella-longtap-swipe - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="0.3.1"></a>
## [0.3.1](https://github.com/oribella/longtap-swipe/compare/v0.3.0...v0.3.1) (2015-12-10)
### Bug Fixes
* **dist:** update dist to correct format ([c21fbf2](https://github.com/oribella/longtap-swipe/commit/c21fbf2))
<a name="0.3.0"></a>

@@ -2,0 +12,0 @@ # [0.3.0](https://github.com/oribella/longtap-swipe/compare/v0.2.0...v0.3.0) (2015-12-10)

216

dist/amd/index.js
"use strict";
var _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; }; })();
define(["exports", "oribella-framework"], function (exports, _oribellaFramework) {
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LongtapSwipe = undefined;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LongtapSwipe = undefined;
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _oribellaFramework = require("oribella-framework");
var _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);
}
}
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
})();
var LongtapSwipe = exports.LongtapSwipe = (function () {
_createClass(LongtapSwipe, null, [{
key: "defaultOptions",
value: function defaultOptions() {
return {
radiusThreshold: 2,
touches: 1,
prio: 100,
which: 1,
timeThreshold: 500
};
}
}]);
var LongtapSwipe = exports.LongtapSwipe = (function () {
_createClass(LongtapSwipe, null, [{
key: "defaultOptions",
value: function defaultOptions() {
return {
radiusThreshold: 2,
touches: 1,
prio: 100,
which: 1,
timeThreshold: 500
};
}
}]);
function LongtapSwipe(subscriber, element) {
_classCallCheck(this, LongtapSwipe);
function LongtapSwipe(subscriber, element) {
_classCallCheck(this, LongtapSwipe);
this.subscriber = subscriber;
this.element = element;
this.remove = null;
this.removeLongtap = null;
this.removeSwipe = null;
this.allowSwipe = false;
this.data = {};
}
this.subscriber = subscriber;
this.element = element;
this.remove = null;
this.removeLongtap = null;
this.removeSwipe = null;
this.allowSwipe = false;
this.data = {};
}
_createClass(LongtapSwipe, [{
key: "bind",
value: function bind(addHandle, element, remove) {
var lts = this;
this.removeLongtap = addHandle(element, "longtap", {
selector: this.subscriber.selector,
options: this.subscriber.options,
start: function start() {
lts.allowSwipe = false;
},
timeEnd: function timeEnd() {
lts.allowSwipe = true;
_createClass(LongtapSwipe, [{
key: "bind",
value: function bind(addHandle, element, remove) {
var lts = this;
this.removeLongtap = addHandle(element, "longtap", {
selector: this.subscriber.selector,
options: this.subscriber.options,
start: function start() {
lts.allowSwipe = false;
},
timeEnd: function timeEnd() {
lts.allowSwipe = true;
}
});
this.removeSwipe = addHandle(element, "swipe", {
selector: this.subscriber.selector,
options: this.subscriber.options,
down: this.swipedown.bind(this),
start: this.swipestart.bind(this),
update: this.swipeupdate.bind(this),
end: this.swipeend.bind(this),
cancel: this.swipecancel.bind(this)
});
this.remove = remove;
}
}, {
key: "unbind",
value: function unbind() {
this.removeLongtap();
this.removeSwipe();
}
}, {
key: "swipedown",
value: function swipedown(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.result = this.subscriber.down(event, this.data, this.element);
return _oribellaFramework.RETURN_FLAG.map(this.result);
}
}, {
key: "swipestart",
value: function swipestart(event, pagePoints) {
if (!this.allowSwipe) {
this.remove();
return false;
}
});
this.removeSwipe = addHandle(element, "swipe", {
selector: this.subscriber.selector,
options: this.subscriber.options,
down: this.swipedown.bind(this),
start: this.swipestart.bind(this),
update: this.swipeupdate.bind(this),
end: this.swipeend.bind(this),
cancel: this.swipecancel.bind(this)
});
this.remove = remove;
}
}, {
key: "unbind",
value: function unbind() {
this.removeLongtap();
this.removeSwipe();
}
}, {
key: "swipedown",
value: function swipedown(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.result = this.subscriber.down(event, this.data, this.element);
return _oribellaFramework.RETURN_FLAG.map(this.result);
}
}, {
key: "swipestart",
value: function swipestart(event, pagePoints) {
if (!this.allowSwipe) {
this.remove();
return false;
this.data.pagePoints = pagePoints;
this.subscriber.start(event, this.data, this.element);
return true;
}
this.data.pagePoints = pagePoints;
this.subscriber.start(event, this.data, this.element);
return true;
}
}, {
key: "swipeupdate",
value: function swipeupdate(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.update(event, this.data, this.element);
}
}, {
key: "swipeend",
value: function swipeend(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.end(event, this.data, this.element);
}
}, {
key: "swipecancel",
value: function swipecancel(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.cancel(event, this.data, this.element);
}
}]);
}, {
key: "swipeupdate",
value: function swipeupdate(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.update(event, this.data, this.element);
}
}, {
key: "swipeend",
value: function swipeend(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.end(event, this.data, this.element);
}
}, {
key: "swipecancel",
value: function swipecancel(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.cancel(event, this.data, this.element);
}
}]);
return LongtapSwipe;
})();
return LongtapSwipe;
})();
});
"use strict";
var _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; }; })();
System.register(["oribella-framework"], function (_export) {
var RETURN_FLAG, _createClass, LongtapSwipe;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LongtapSwipe = undefined;
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
var _oribellaFramework = require("oribella-framework");
return {
setters: [function (_oribellaFramework) {
RETURN_FLAG = _oribellaFramework.RETURN_FLAG;
}],
execute: function () {
_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);
}
}
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
})();
var LongtapSwipe = exports.LongtapSwipe = (function () {
_createClass(LongtapSwipe, null, [{
key: "defaultOptions",
value: function defaultOptions() {
return {
radiusThreshold: 2,
touches: 1,
prio: 100,
which: 1,
timeThreshold: 500
};
}
}]);
_export("LongtapSwipe", LongtapSwipe = (function () {
_createClass(LongtapSwipe, null, [{
key: "defaultOptions",
value: function defaultOptions() {
return {
radiusThreshold: 2,
touches: 1,
prio: 100,
which: 1,
timeThreshold: 500
};
}
}]);
function LongtapSwipe(subscriber, element) {
_classCallCheck(this, LongtapSwipe);
function LongtapSwipe(subscriber, element) {
_classCallCheck(this, LongtapSwipe);
this.subscriber = subscriber;
this.element = element;
this.remove = null;
this.removeLongtap = null;
this.removeSwipe = null;
this.allowSwipe = false;
this.data = {};
}
this.subscriber = subscriber;
this.element = element;
this.remove = null;
this.removeLongtap = null;
this.removeSwipe = null;
this.allowSwipe = false;
this.data = {};
}
_createClass(LongtapSwipe, [{
key: "bind",
value: function bind(addHandle, element, remove) {
var lts = this;
this.removeLongtap = addHandle(element, "longtap", {
selector: this.subscriber.selector,
options: this.subscriber.options,
start: function start() {
lts.allowSwipe = false;
},
timeEnd: function timeEnd() {
lts.allowSwipe = true;
}
});
this.removeSwipe = addHandle(element, "swipe", {
selector: this.subscriber.selector,
options: this.subscriber.options,
down: this.swipedown.bind(this),
start: this.swipestart.bind(this),
update: this.swipeupdate.bind(this),
end: this.swipeend.bind(this),
cancel: this.swipecancel.bind(this)
});
this.remove = remove;
_createClass(LongtapSwipe, [{
key: "bind",
value: function bind(addHandle, element, remove) {
var lts = this;
this.removeLongtap = addHandle(element, "longtap", {
selector: this.subscriber.selector,
options: this.subscriber.options,
start: function start() {
lts.allowSwipe = false;
},
timeEnd: function timeEnd() {
lts.allowSwipe = true;
}
});
this.removeSwipe = addHandle(element, "swipe", {
selector: this.subscriber.selector,
options: this.subscriber.options,
down: this.swipedown.bind(this),
start: this.swipestart.bind(this),
update: this.swipeupdate.bind(this),
end: this.swipeend.bind(this),
cancel: this.swipecancel.bind(this)
});
this.remove = remove;
}
}, {
key: "unbind",
value: function unbind() {
this.removeLongtap();
this.removeSwipe();
}
}, {
key: "swipedown",
value: function swipedown(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.result = this.subscriber.down(event, this.data, this.element);
return RETURN_FLAG.map(this.result);
}
}, {
key: "swipestart",
value: function swipestart(event, pagePoints) {
if (!this.allowSwipe) {
this.remove();
return false;
}
this.data.pagePoints = pagePoints;
this.subscriber.start(event, this.data, this.element);
return true;
}
}, {
key: "swipeupdate",
value: function swipeupdate(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.update(event, this.data, this.element);
}
}, {
key: "swipeend",
value: function swipeend(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.end(event, this.data, this.element);
}
}, {
key: "swipecancel",
value: function swipecancel(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.cancel(event, this.data, this.element);
}
}]);
return LongtapSwipe;
})());
_export("LongtapSwipe", LongtapSwipe);
}
}, {
key: "unbind",
value: function unbind() {
this.removeLongtap();
this.removeSwipe();
}
}, {
key: "swipedown",
value: function swipedown(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.result = this.subscriber.down(event, this.data, this.element);
return _oribellaFramework.RETURN_FLAG.map(this.result);
}
}, {
key: "swipestart",
value: function swipestart(event, pagePoints) {
if (!this.allowSwipe) {
this.remove();
return false;
}
this.data.pagePoints = pagePoints;
this.subscriber.start(event, this.data, this.element);
return true;
}
}, {
key: "swipeupdate",
value: function swipeupdate(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.update(event, this.data, this.element);
}
}, {
key: "swipeend",
value: function swipeend(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.end(event, this.data, this.element);
}
}, {
key: "swipecancel",
value: function swipecancel(event, pagePoints) {
this.data.pagePoints = pagePoints;
this.subscriber.cancel(event, this.data, this.element);
}
}]);
return LongtapSwipe;
})();
};
});
{
"name": "oribella-longtap-swipe",
"version": "0.3.0",
"version": "0.3.1",
"description": "Longtap swipe gesture",

@@ -27,3 +27,3 @@ "license": "MIT",

"dependencies": {
"oribella-framework": "npm:oribella-framework@^0.3.0"
"oribella-framework": "npm:oribella-framework@^0.3.1"
},

@@ -38,4 +38,4 @@ "devDependencies": {

"jspm": "^0.16.15",
"oribella-dev": "^0.1.3"
"oribella-dev": "^0.1.4"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc