-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Hi, your solution interest me.
Pardon me if my questions sound silly.
May i know if the xorTap.js is complete as in:
(1) It is stated
@param {function...} actions the possible actions to take in order by number of clicks
@param {number} speed max delay between multi-clicks in milliseconds (optional, default: 300ms)
var xorTap = function()
It doesn't seem like your function is taking in parameters.
(2)
var actions = Array.prototype.slice.call(arguments), length = actions.length;
Where does "Array" and "arguments" being pass from?
(3)
I try to follow your index.html using typescript as i am using Angular Universal, thus i export your xorTap.js like this:
export default function func_xorTap() {
...
}
In my html:
var xorClick = func_xorTap(
function (e) {
// single click action here
console.log('tap - started :' + this.id + ' | ' + e.type);
},
function (e) {
// double click action here
console.log('tap - started :' + this.id + ' | ' + e.type);
},
function (e) {
// double click action here
console.log('tap - started :' + this.id + ' | ' + e.type);
},
MULTI_CLICK_DELAY);
//console.log('xorClick : ' + xorClick);
NGdatatable.addEventListener('tap', xorClick(), false);
I already have this error:
Error TS2346 (TS) Supplied parameters do not match any signature of call target.
Please advise me.
Thank you.