RamonSmit / Nestable2

New pickup of Nestable!
Other
322 stars 147 forks source link

add 'moveIn' and 'listNo' data attribute handler #90

Open morganpizzini opened 6 years ago

morganpizzini commented 6 years ago

description here

pjona commented 6 years ago

@morganpizzini Can you add some documentation about it in README.md?

RomanBurunkov commented 6 years ago

Consider updated README, I'm not quite sure that code:

            var itemMoveIn = this.dragEl.find(opt.itemNodeName).data('moveIn');
            var listNo = this.pointEl.closest('.dd-list').data('listNo');
            if (itemMoveIn !== listNo) {
                return;
            }

works properly with attributes: 'data-move-in' and 'data-list-no'. It looks like attributes should be 'data-moveIn' and 'data-listNo'.

It's a bit confusing for me, but it works =)

morganpizzini commented 6 years ago

ops yes, i think i press some strange shortcuts who delete "-" and uppercase the first char after 😄 sorry my bad, i'm going to fix it

RomanBurunkov commented 6 years ago

@morganpizzini , that's, ok =)

But check my update to previous comment....it works =))) Despite, fixing it also works and also more clear.

morganpizzini commented 6 years ago

Yes of course, data-list-no inside "Item 6" must have 3 as index and not 2, same for data-move-in inside

https://jsfiddle.net/s5yt9mc4/7/