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

attachTo is not working when passing a string #122

Closed
menor opened this issue Jun 17, 2016 · 1 comment
Closed

attachTo is not working when passing a string #122

menor opened this issue Jun 17, 2016 · 1 comment

Comments

@menor
Copy link

menor commented Jun 17, 2016

First of all, thanks for the awesome work on the library.

And now the issue:

The documentation specifies that we need to pass a string to the attachTo key
image

But this wasn't working for me, I had to pass an object like this
attachTo: {element: '.add', on: true}
To make it work, I think this is related to the parsePosition method that returns null if the str argument is not an object with an element and on keys.

function parsePosition(str) {
  if (isObjectLoose(str)) {
    if (str.hasOwnProperty("element") && str.hasOwnProperty("on")) {
      return str;
    }
    return null;
  }

Didn't made a pull request cause I don't know if is a matter of fixing the code or the documentation. But creating this issue for reference.

I'm passing the attachment positions as tether options, maybe that has also something to be with the issue.

@menor
Copy link
Author

menor commented Oct 24, 2016

closed by #131
Thank you!

@menor menor closed this as completed Oct 24, 2016
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

1 participant