For example:
- a (position 1)
- b (position 2)
- c (position 3)
move c between a and b: cp=1
move a between b and c: cp=2
The downward shift position adds 1 more. I’m not sure why. Here is a fix. Maybe it’s not very good.
Replace
"position" : data.rslt.cp i,
with
"position" : data.rslt.o.index( ) i,
may be helpful to you