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

Creating duplicate icon when removing node using extension columnview #899

Closed
AkibS opened this issue Oct 17, 2018 · 9 comments
Closed

Creating duplicate icon when removing node using extension columnview #899

AkibS opened this issue Oct 17, 2018 · 9 comments

Comments

@AkibS
Copy link

AkibS commented Oct 17, 2018

I am using column view extension along with context menu.
While deleting any node creating duplicate icon at parent node. Also child nodes not removed.


$("#columnview").fancytree(
{
            extensions: ["columnview"],
            checkbox: true,
            source: {
                url: $("#columnview").data("url")
            }
 }); 


   $("#columnview").contextmenu({
            delegate: "span.fancytree-node",
            autoFocus: true,
            menu: [
                { title: "Delete", cmd: "delete", uiIcon: "ui-icon-trash", disable: true }
            ],
            select: function (event, ui) {

                var node = $.ui.fancytree.getNode(ui.target);

                switch (ui.cmd) {
                    case "delete":
                        node.remove();
                        break;
            }}
        }
);

I may have missed something. if that so could you please help to solve this.

Attaching images.

step1

step2

step3

I apologize in advance.

@mar10
Copy link
Owner

mar10 commented Oct 28, 2018

@AkibS
Copy link
Author

AkibS commented Oct 30, 2018

Hello,

I have created video regarding steps to reproduce along with the jsfiddle example.

example used:
http://wwwendt.de/tech/fancytree/demo/#sample-ext-columnview.html

JS Fiddle:
http://jsfiddle.net/ve0txL68/

Attached video to reproduce:
Recording #2.zip

Hope this will help!

Thanks in advance.

@mar10 mar10 removed the waiting label Oct 30, 2018
@mar10
Copy link
Owner

mar10 commented Oct 30, 2018

Thanks, I will look into it (note however, that column view is still 'experimental' and was seemingly not much used by others so far ;-)

@AkibS
Copy link
Author

AkibS commented Oct 31, 2018

Thank you Martin,

For reverting back and that "Column View" is very great functionality (Implementation) of fancy tree.
if only these bugs were crushed.

Thanks again!

mar10 added a commit that referenced this issue Oct 31, 2018
mar10 added a commit that referenced this issue Oct 31, 2018
@AkibS
Copy link
Author

AkibS commented Nov 2, 2018

Thank Martin for your time,

But this issue which i have described in earlier post is still reproducing.

@AkibS
Copy link
Author

AkibS commented Nov 2, 2018

Hello Martin.

I have solved this problem with quick hack.

Added CSS:

span.fancytree-exp-nl span.fancytree-title + span.fancytree-icon.fancytree-cv-right{
    display : none;
  }
  
  span.fancytree-exp-n span.fancytree-title + span.fancytree-icon.fancytree-cv-right{
    display : none;
  }

and for removing all child nodes:

`function removeAllNode(node){
        if (node.hasChildren()) {
            while (node.children != null) {
                removeAllNode(node.children[0]);
            }
        }
        node.remove();
        }`

attaching jsfiddle link for reference. hope this could help for solving actual issue.

http://jsfiddle.net/ve0txL68/2/

cheers @mar10 👍

@mar10 mar10 reopened this Nov 2, 2018
@mar10
Copy link
Owner

mar10 commented Nov 2, 2018

Thanks for testing!

@mar10 mar10 closed this as completed in b9e1a5d Nov 3, 2018
@mar10
Copy link
Owner

mar10 commented Nov 3, 2018

Seems I tested the wrong thing last time, hope it's fixed now.

@AkibS
Copy link
Author

AkibS commented Nov 12, 2018

Thank you very much Martin!

I'll check it again.

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

No branches or pull requests

2 participants