c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine

Home Page:http://sciter.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Misstype in acceptDrop function.

ValentiWorkLearning opened this issue · comments

Look at this signature of acceptDrop:

//| def.acceptDrop = function(draggable, target), function to be called before the drop, if it is defined and returns true operation ends successfully.

And the call on ddm.tis:
if(!def.acceptDrop || def.acceptDrop( dd_source, dd_target, dst.index ))
Probably signature need to be changed to

//| def.acceptDrop = function(draggable, target, insertIndex), function to be called before the drop, if it is defined and returns true operation ends successfully.

And, I'm not sure, that destination index needed for acceptDrop function. Probably when draggable arrives to target - it's possible to check the correctness of drop possibility without index. Moreover, index of destination is unuseful for tree-structures with drag-n-drop. I think, the better solution is remove the dst.index from def.acceptDrop signature.