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

Depth count - difference between current code and demo #123

Open
Vilfago opened this issue Jun 13, 2018 · 0 comments
Open

Depth count - difference between current code and demo #123

Vilfago opened this issue Jun 13, 2018 · 0 comments

Comments

@Vilfago
Copy link

Vilfago commented Jun 13, 2018

First, thanks for this plugin !

The demo don't use the same code as the current code, which cause issue in depth count.

Modification below are related to toArray method.

Current code, line 752

$(this.element).children(o.items).each(function () {
    left = _recursiveArray(this, sDepth, left);
});

To be change to :

$(this.element).children(o.items).each(function () {
    left = _recursiveArray(this, sDepth + 1, left);
});

and same in _recursiveArray

if (depth === sDepth) {
    pid = o.rootID;
} else {

to

if (depth === sDepth + 1) {
    pid = o.rootID;
} else {
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