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

Version 2.36.0 breaks dnd marker #1021

Closed
xor22h opened this issue Jul 24, 2020 · 0 comments
Closed

Version 2.36.0 breaks dnd marker #1021

xor22h opened this issue Jul 24, 2020 · 0 comments

Comments

@xor22h
Copy link

xor22h commented Jul 24, 2020

Expected and Actual Behavior

using both dnd5 and table is not showing dragMarker

Steps to Reproduce the Problem

  1. Download fancytree 2.36
<script type="text/javascript">
    $(function () {
        $("#menu-tree").fancytree({
            extensions: ["dnd5","table"],
            checkbox: false,
            dnd5: {
                preventRecursion: true, // Prevent dropping nodes on own descendants
                preventVoidMoves: true, // Prevent moving nodes 'before self', etc.
                dragStart: function (node, data) {
                    return node.data.id != 0;
                },
                dragEnter: function (node, data) {
                    if(node.data.id === 0) {
                       return 'over';
                    }
                    return true;
                },
                dragDrop: function (node, data) {
                    var sameTree = data.otherNode.tree === data.tree;
                    console.log(data.otherNode.data);
                    console.log(`move [${data.otherNode.data.id}-'${data.otherNode.title}'] ${data.hitMode} [${node.data.id}-'${node.title}'] `);
        
                },
            },
            table: {
                indentation: 20,      // indent 20px per node level
                nodeColumnIdx: 1,     // render the node title into the 2nd column
            },
            source: [{
                id: 0,
                title: "MainMenu",
                expanded: true,
                folder: true,
                children: <?= json_encode($menu_tree->children, JSON_PRETTY_PRINT); ?>
            }],
            renderColumns: function (event, data) {
                var node = data.node;
                $tdList = $(node.tr).find(">td");
                $tdList.eq(0).text(node.data.id);
                $tdList.eq(2).text(node.data.controller);
            }
    });
  });
</script>

Environment

  • Browser type and version: Chrome
  • Fancytree version: 2.36.0
    enabled/affected extensions: dnd5, table

Using same configuration with 2.35.0 works fine.

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