sciter-sdk
sciter-sdk copied to clipboard
Misstype in acceptDrop function.
Look at this signature of acceptDrop:
https://github.com/c-smile/sciter-sdk/blob/f750c7cb135ae3e580d97cfeaedce0010f3ff67b/samples/drag-n-drop-manager/ddm.tis#L21
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.