Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xorTap.js #2

Open
helloneoberg opened this issue Dec 7, 2017 · 2 comments
Open

xorTap.js #2

helloneoberg opened this issue Dec 7, 2017 · 2 comments

Comments

@helloneoberg
Copy link

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.

@thithuhanguyen
Copy link

  • ``

Sent with GitHawk

@thithuhanguyen
Copy link

Hello

Sent with GitHawk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants